Title: [236974] trunk/Source/WebCore
Revision
236974
Author
commit-qu...@webkit.org
Date
2018-10-09 12:23:21 -0700 (Tue, 09 Oct 2018)

Log Message

[CoordGraphics] Remove the 'previous backing store' logic
https://bugs.webkit.org/show_bug.cgi?id=188838

Patch by Carlos Eduardo Ramalho <cadubent...@gmail.com> on 2018-10-09
Reviewed by Žan Doberšek.

Remove previousBackingStore from LayerState, since it's not needed anymore.
When there is scale adjustment, we now simply discard mainBackingStore and
recreate a new one.

No new tests required.

* platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (236973 => 236974)


--- trunk/Source/WebCore/ChangeLog	2018-10-09 19:04:44 UTC (rev 236973)
+++ trunk/Source/WebCore/ChangeLog	2018-10-09 19:23:21 UTC (rev 236974)
@@ -1,3 +1,22 @@
+2018-10-09  Carlos Eduardo Ramalho  <cadubent...@gmail.com>
+
+        [CoordGraphics] Remove the 'previous backing store' logic
+        https://bugs.webkit.org/show_bug.cgi?id=188838
+
+        Reviewed by Žan Doberšek.
+
+        Remove previousBackingStore from LayerState, since it's not needed anymore.
+        When there is scale adjustment, we now simply discard mainBackingStore and
+        recreate a new one.
+
+        No new tests required.
+
+        * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h:
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
+        (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
+        (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
+
 2018-10-09  Antti Koivisto  <an...@apple.com>
 
         [PSON] Prewarm system UI font

Modified: trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h (236973 => 236974)


--- trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h	2018-10-09 19:04:44 UTC (rev 236973)
+++ trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h	2018-10-09 19:23:21 UTC (rev 236974)
@@ -85,7 +85,6 @@
         LayerState& operator=(LayerState&&) = delete;
 
         std::unique_ptr<WebCore::TiledBackingStore> mainBackingStore;
-        std::unique_ptr<WebCore::TiledBackingStore> previousBackingStore;
 
         TileUpdate update;
         bool isFlushing { false };

Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (236973 => 236974)


--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp	2018-10-09 19:04:44 UTC (rev 236973)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp	2018-10-09 19:23:21 UTC (rev 236974)
@@ -647,7 +647,6 @@
         auto& layerState = downcast<Nicosia::BackingStoreTextureMapperImpl>(m_nicosia.backingStore->impl()).layerState();
         layerState.isPurging = true;
         layerState.mainBackingStore = nullptr;
-        layerState.previousBackingStore = nullptr;
 
         m_nicosia.backingStore = nullptr;
         m_nicosia.delta.backingStoreChanged = true;
@@ -867,17 +866,10 @@
         };
 
     // Address the content scale adjustment.
-    // FIXME: the previousBackingStore logic is likely possible to remove.
-    // https://bugs.webkit.org/show_bug.cgi?id=188693
     if (m_pendingContentsScaleAdjustment) {
         if (layerState.mainBackingStore && layerState.mainBackingStore->contentsScale() != effectiveContentsScale()) {
-            // Between creating the new backing store and painting the content, we do not
-            // want to drop the previous one as that might result in briefly seeing flickering
-            // as the old tiles may be dropped before something replaces them.
-            layerState.previousBackingStore = WTFMove(layerState.mainBackingStore);
-
-            // No reason to save the previous backing store for non-visible areas.
-            layerState.previousBackingStore->removeAllNonVisibleTiles(transformedVisibleRect(), IntRect(0, 0, size().width(), size().height()));
+            // Discard the TiledBackingStore object to reconstruct it with new content scale.
+            layerState.mainBackingStore = nullptr;
         }
         m_pendingContentsScaleAdjustment = false;
     }
@@ -943,12 +935,6 @@
             didUpdateTileBuffers();
     }
 
-    // The previous backing store is kept around to avoid flickering between
-    // removing the existing tiles and painting the new ones. The first time
-    // the visibleRect is full painted we remove the previous backing store.
-    if (layerState.previousBackingStore && layerState.mainBackingStore->visibleAreaIsCovered())
-        layerState.previousBackingStore = nullptr;
-
     // Request a second update immediately if some tiles are still pending creation.
     if (layerState.hasPendingTileCreation) {
         setNeedsVisibleRectAdjustment();
@@ -967,7 +953,6 @@
         auto& layerState = downcast<Nicosia::BackingStoreTextureMapperImpl>(m_nicosia.backingStore->impl()).layerState();
         layerState.isPurging = true;
         layerState.mainBackingStore = nullptr;
-        layerState.previousBackingStore = nullptr;
 
         m_nicosia.backingStore = nullptr;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to