[CoordGraphics] Remove TiledBackingStoreClient inheritance from CoordinatedGraphicsLayer
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2018 06:27:11 +0000 (06:27 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2018 06:27:11 +0000 (06:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188849

Reviewed by Michael Catanzaro.

Remove the TiledBackingStoreClient inheritance from the
CoordinatedGraphicsLayer class since it's not used anymore after changes
made in r235165.

Related TiledBackingStore objects on this class, along with tile state
tracking member variables on the CoordinatedGraphicsLayerState class,
are also removed.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::resetLayerState):
(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
(WebCore::CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation): Deleted.
(WebCore::CoordinatedGraphicsLayer::createTile): Deleted.
(WebCore::CoordinatedGraphicsLayer::updateTile): Deleted.
(WebCore::CoordinatedGraphicsLayer::removeTile): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(WebCore::CoordinatedGraphicsLayerState::hasPendingChanges const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235218 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h

index d8b1bf8..a62aabc 100644 (file)
@@ -1,5 +1,32 @@
 2018-08-22  Zan Dobersek  <zdobersek@igalia.com>
 
+        [CoordGraphics] Remove TiledBackingStoreClient inheritance from CoordinatedGraphicsLayer
+        https://bugs.webkit.org/show_bug.cgi?id=188849
+
+        Reviewed by Michael Catanzaro.
+
+        Remove the TiledBackingStoreClient inheritance from the
+        CoordinatedGraphicsLayer class since it's not used anymore after changes
+        made in r235165.
+
+        Related TiledBackingStore objects on this class, along with tile state
+        tracking member variables on the CoordinatedGraphicsLayerState class,
+        are also removed.
+
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
+        (WebCore::CoordinatedGraphicsLayer::resetLayerState):
+        (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
+        (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation): Deleted.
+        (WebCore::CoordinatedGraphicsLayer::createTile): Deleted.
+        (WebCore::CoordinatedGraphicsLayer::updateTile): Deleted.
+        (WebCore::CoordinatedGraphicsLayer::removeTile): Deleted.
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
+        (WebCore::CoordinatedGraphicsLayerState::hasPendingChanges const):
+
+2018-08-22  Zan Dobersek  <zdobersek@igalia.com>
+
         [CoordGraphics] Remove CoordinatedImageBacking and related functionality
         https://bugs.webkit.org/show_bug.cgi?id=188847
 
index 7c61642..876aec9 100644 (file)
@@ -38,6 +38,7 @@
 #include "NicosiaPaintingEngine.h"
 #include "ScrollableArea.h"
 #include "TextureMapperPlatformLayerProxyProvider.h"
+#include "TiledBackingStore.h"
 #ifndef NDEBUG
 #include <wtf/SetForScope.h>
 #endif
@@ -155,7 +156,6 @@ CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer()
         purgeBackingStores();
         m_coordinator->detachLayer(this);
     }
-    ASSERT(!m_mainBackingStore);
     ASSERT(!m_nicosia.imageBacking);
     ASSERT(!m_nicosia.backingStore);
     willBeDestroyed();
@@ -950,9 +950,6 @@ void CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers()
 void CoordinatedGraphicsLayer::resetLayerState()
 {
     m_layerState.changeMask = 0;
-    m_layerState.tilesToCreate.clear();
-    m_layerState.tilesToRemove.clear();
-    m_layerState.tilesToUpdate.clear();
 }
 
 void CoordinatedGraphicsLayer::deviceOrPageScaleFactorChanged()
@@ -966,12 +963,6 @@ float CoordinatedGraphicsLayer::effectiveContentsScale()
     return selfOrAncestorHaveNonAffineTransforms() ? 1 : deviceScaleFactor() * pageScaleFactor();
 }
 
-void CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation()
-{
-    setNeedsVisibleRectAdjustment();
-    notifyFlushRequired();
-}
-
 static void clampToContentsRectIfRectIsInfinite(FloatRect& rect, const FloatSize& contentsSize)
 {
     if (rect.width() >= LayoutUnit::nearlyMax() || rect.width() <= LayoutUnit::nearlyMin()) {
@@ -1000,36 +991,6 @@ IntRect CoordinatedGraphicsLayer::transformedVisibleRect()
     return enclosingIntRect(rect);
 }
 
-void CoordinatedGraphicsLayer::createTile(uint32_t tileID, float scaleFactor)
-{
-    ASSERT(m_coordinator);
-    ASSERT(m_coordinator->isFlushingLayerChanges());
-
-    TileCreationInfo creationInfo;
-    creationInfo.tileID = tileID;
-    creationInfo.scale = scaleFactor;
-    m_layerState.tilesToCreate.append(creationInfo);
-}
-
-void CoordinatedGraphicsLayer::updateTile(uint32_t tileID, const SurfaceUpdateInfo& updateInfo, const IntRect& tileRect)
-{
-    ASSERT(m_coordinator);
-    ASSERT(m_coordinator->isFlushingLayerChanges());
-
-    TileUpdateInfo tileUpdateInfo;
-    tileUpdateInfo.tileID = tileID;
-    tileUpdateInfo.tileRect = tileRect;
-    tileUpdateInfo.updateInfo = updateInfo;
-    m_layerState.tilesToUpdate.append(tileUpdateInfo);
-}
-
-void CoordinatedGraphicsLayer::removeTile(uint32_t tileID)
-{
-    ASSERT(m_coordinator);
-    ASSERT(m_coordinator->isFlushingLayerChanges() || m_isPurging);
-    m_layerState.tilesToRemove.append(tileID);
-}
-
 void CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers()
 {
     if (CoordinatedGraphicsLayer* mask = downcast<CoordinatedGraphicsLayer>(maskLayer()))
@@ -1161,8 +1122,6 @@ void CoordinatedGraphicsLayer::purgeBackingStores()
 #ifndef NDEBUG
     SetForScope<bool> updateModeProtector(m_isPurging, true);
 #endif
-    m_mainBackingStore = nullptr;
-    m_previousBackingStore = nullptr;
     if (m_nicosia.backingStore) {
         auto& layerState = downcast<Nicosia::BackingStoreTextureMapperImpl>(m_nicosia.backingStore->impl()).layerState();
         layerState.isPurging = true;
index b4cbef4..10a2d59 100644 (file)
@@ -32,8 +32,6 @@
 #include "NicosiaBuffer.h"
 #include "NicosiaPlatformLayer.h"
 #include "TextureMapperAnimation.h"
-#include "TiledBackingStore.h"
-#include "TiledBackingStoreClient.h"
 #include "TransformationMatrix.h"
 #include <wtf/text/StringHash.h>
 
@@ -56,8 +54,7 @@ public:
     virtual void syncLayerState(CoordinatedLayerID, CoordinatedGraphicsLayerState&) = 0;
 };
 
-class WEBCORE_EXPORT CoordinatedGraphicsLayer : public GraphicsLayer
-    , public TiledBackingStoreClient {
+class WEBCORE_EXPORT CoordinatedGraphicsLayer : public GraphicsLayer {
 public:
     explicit CoordinatedGraphicsLayer(Type, GraphicsLayerClient&);
     virtual ~CoordinatedGraphicsLayer();
@@ -119,12 +116,6 @@ public:
 
     IntRect transformedVisibleRect();
 
-    // TiledBackingStoreClient
-    void tiledBackingStoreHasPendingTileCreation() override;
-    void createTile(uint32_t tileID, float) override;
-    void updateTile(uint32_t tileID, const SurfaceUpdateInfo&, const IntRect&) override;
-    void removeTile(uint32_t tileID) override;
-
     void setCoordinator(CoordinatedGraphicsLayerClient*);
     void setCoordinatorIncludingSubLayersIfNeeded(CoordinatedGraphicsLayerClient*);
 
@@ -199,8 +190,6 @@ private:
 #endif
 
     CoordinatedGraphicsLayerClient* m_coordinator;
-    std::unique_ptr<TiledBackingStore> m_mainBackingStore;
-    std::unique_ptr<TiledBackingStore> m_previousBackingStore;
 
     struct {
         bool completeLayer { false };
index ffcf284..9c2364a 100644 (file)
@@ -52,17 +52,6 @@ namespace WebCore {
 typedef uint32_t CoordinatedLayerID;
 enum { InvalidCoordinatedLayerID = 0 };
 
-struct TileUpdateInfo {
-    uint32_t tileID;
-    IntRect tileRect;
-    WebCore::SurfaceUpdateInfo updateInfo;
-};
-
-struct TileCreationInfo {
-    uint32_t tileID;
-    float scale;
-};
-
 struct DebugVisuals {
     Color debugBorderColor;
     float debugBorderWidth { 0 };
@@ -145,22 +134,18 @@ struct CoordinatedGraphicsLayerState {
     FilterOperations filters;
     TextureMapperAnimations animations;
     Vector<uint32_t> children;
-    Vector<TileCreationInfo> tilesToCreate;
-    Vector<uint32_t> tilesToRemove;
     CoordinatedLayerID replica;
     CoordinatedLayerID mask;
     DebugVisuals debugVisuals;
     RepaintCount repaintCount;
 
-    Vector<TileUpdateInfo> tilesToUpdate;
-
 #if USE(COORDINATED_GRAPHICS_THREADED)
     RefPtr<TextureMapperPlatformLayerProxy> platformLayerProxy;
 #endif
 
     bool hasPendingChanges() const
     {
-        return changeMask || tilesToUpdate.size() || tilesToRemove.size() || tilesToCreate.size();
+        return changeMask;
     }
 };