Title: [212491] branches/safari-603-branch/Source

Diff

Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (212490 => 212491)


--- branches/safari-603-branch/Source/WebCore/ChangeLog	2017-02-17 00:55:59 UTC (rev 212490)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog	2017-02-17 00:56:04 UTC (rev 212491)
@@ -1,5 +1,30 @@
 2017-02-16  Matthew Hanson  <[email protected]>
 
+        Merge r211688. rdar://problem/30467177
+
+    2017-02-05  Simon Fraser  <[email protected]>
+
+            Remove unparentsOffscreenTiles logic in TileController
+            https://bugs.webkit.org/show_bug.cgi?id=167823
+
+            Reviewed by Tim Horton.
+
+            Give all TileGrids the "unparents offscreen tiles" behavior. This was enabled for
+            only the page tiles in WK2 on Mac and iOS, but there's no reason to not use it for
+            tiled composited layers also.
+
+            Also use more modern C++ idioms in a few places.
+
+            * platform/graphics/TiledBacking.h:
+            * platform/graphics/ca/TileController.h:
+            * platform/graphics/ca/TileGrid.cpp:
+            (WebCore::TileGrid::revalidateTiles):
+            (WebCore::TileGrid::ensureTilesForRect):
+            * rendering/RenderLayerBacking.cpp:
+            (WebCore::RenderLayerBacking::RenderLayerBacking):
+
+2017-02-16  Matthew Hanson  <[email protected]>
+
         Merge r211662. rdar://problem/30467322
 
     2017-02-03  Simon Fraser  <[email protected]>

Modified: branches/safari-603-branch/Source/WebCore/platform/graphics/TiledBacking.h (212490 => 212491)


--- branches/safari-603-branch/Source/WebCore/platform/graphics/TiledBacking.h	2017-02-17 00:55:59 UTC (rev 212490)
+++ branches/safari-603-branch/Source/WebCore/platform/graphics/TiledBacking.h	2017-02-17 00:56:04 UTC (rev 212491)
@@ -125,9 +125,6 @@
     virtual void setScrollingPerformanceLoggingEnabled(bool) = 0;
     virtual bool scrollingPerformanceLoggingEnabled() const = 0;
     
-    virtual void setUnparentsOffscreenTiles(bool) = 0;
-    virtual bool unparentsOffscreenTiles() const = 0;
-    
     virtual double retainedTileBackingStoreMemory() const = 0;
 
     virtual void setHasMargins(bool marginTop, bool marginBottom, bool marginLeft, bool marginRight) = 0;

Modified: branches/safari-603-branch/Source/WebCore/platform/graphics/ca/TileController.h (212490 => 212491)


--- branches/safari-603-branch/Source/WebCore/platform/graphics/ca/TileController.h	2017-02-17 00:55:59 UTC (rev 212490)
+++ branches/safari-603-branch/Source/WebCore/platform/graphics/ca/TileController.h	2017-02-17 00:56:04 UTC (rev 212491)
@@ -115,7 +115,6 @@
     int rightMarginWidth() const override;
     TileCoverage tileCoverage() const override { return m_tileCoverage; }
     void adjustTileCoverageRect(FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, float contentsScale) const override;
-    bool unparentsOffscreenTiles() const override { return m_unparentsOffscreenTiles; }
     bool scrollingPerformanceLoggingEnabled() const override { return m_scrollingPerformanceLoggingEnabled; }
 
     IntRect boundsAtLastRevalidate() const { return m_boundsAtLastRevalidate; }
@@ -157,7 +156,6 @@
     void forceRepaint() override;
     IntRect tileGridExtent() const override;
     void setScrollingPerformanceLoggingEnabled(bool flag) override { m_scrollingPerformanceLoggingEnabled = flag; }
-    void setUnparentsOffscreenTiles(bool flag) override { m_unparentsOffscreenTiles = flag; }
     double retainedTileBackingStoreMemory() const override;
     IntRect tileCoverageRect() const override;
 #if USE(CA)
@@ -218,7 +216,6 @@
     
     bool m_isInWindow { false };
     bool m_scrollingPerformanceLoggingEnabled { false };
-    bool m_unparentsOffscreenTiles { false };
     bool m_acceleratesDrawing { false };
     bool m_tilesAreOpaque { false };
     bool m_hasTilesWithTemporaryScaleFactor { false }; // Used to make low-res tiles when zooming.

Modified: branches/safari-603-branch/Source/WebCore/platform/graphics/ca/TileGrid.cpp (212490 => 212491)


--- branches/safari-603-branch/Source/WebCore/platform/graphics/ca/TileGrid.cpp	2017-02-17 00:55:59 UTC (rev 212490)
+++ branches/safari-603-branch/Source/WebCore/platform/graphics/ca/TileGrid.cpp	2017-02-17 00:56:04 UTC (rev 212491)
@@ -352,9 +352,9 @@
     }
 
     // Move tiles newly outside the coverage rect into the cohort map.
-    for (TileMap::iterator it = m_tiles.begin(), end = m_tiles.end(); it != end; ++it) {
-        TileInfo& tileInfo = it->value;
-        TileIndex tileIndex = it->key;
+    for (auto& entry : m_tiles) {
+        TileInfo& tileInfo = entry.value;
+        TileIndex tileIndex = entry.key;
 
         PlatformCALayer* tileLayer = tileInfo.layer.get();
         IntRect tileRect = rectForTileIndex(tileIndex);
@@ -371,10 +371,8 @@
             if (tileInfo.cohort == VisibleTileCohort) {
                 tileInfo.cohort = currCohort;
                 ++tilesInCohort;
-
-                if (m_controller.unparentsOffscreenTiles())
-                    tileLayer->removeFromSuperlayer();
-            } else if (m_controller.unparentsOffscreenTiles() && m_controller.shouldAggressivelyRetainTiles() && tileLayer->superlayer()) {
+                tileLayer->removeFromSuperlayer();
+            } else if (m_controller.shouldAggressivelyRetainTiles() && tileLayer->superlayer()) {
                 // Aggressive tile retention means we'll never remove cohorts, but we need to make sure they're unparented.
                 // We can't immediately unparent cohorts comprised of secondary tiles that never touch the primary coverage rect,
                 // because that would defeat the usefulness of prepopulateRect(); instead, age prepopulated tiles out as if they were being removed.
@@ -411,9 +409,9 @@
         m_cohortList.clear();
     }
 
-    if (m_controller.unparentsOffscreenTiles() && (validationPolicy & UnparentAllTiles)) {
-        for (TileMap::iterator it = m_tiles.begin(), end = m_tiles.end(); it != end; ++it)
-            it->value.layer->removeFromSuperlayer();
+    if (validationPolicy & UnparentAllTiles) {
+        for (auto& tile : m_tiles.values())
+            tile.layer->removeFromSuperlayer();
     }
 
     auto boundsAtLastRevalidate = m_controller.boundsAtLastRevalidate();
@@ -531,7 +529,7 @@
 
 IntRect TileGrid::ensureTilesForRect(const FloatRect& rect, CoverageType newTileType)
 {
-    if (m_controller.unparentsOffscreenTiles() && !m_controller.isInWindow())
+    if (!m_controller.isInWindow())
         return IntRect();
 
     FloatRect scaledRect(rect);
@@ -579,9 +577,7 @@
                 ++tilesInCohort;
             }
 
-            bool shouldParentTileLayer = (!m_controller.unparentsOffscreenTiles() || m_controller.isInWindow()) && !tileInfo.layer->superlayer();
-
-            if (shouldParentTileLayer)
+            if (!tileInfo.layer->superlayer())
                 m_containerLayer.get().appendSublayer(*tileInfo.layer);
         }
     }

Modified: branches/safari-603-branch/Source/WebCore/rendering/RenderLayerBacking.cpp (212490 => 212491)


--- branches/safari-603-branch/Source/WebCore/rendering/RenderLayerBacking.cpp	2017-02-17 00:55:59 UTC (rev 212490)
+++ branches/safari-603-branch/Source/WebCore/rendering/RenderLayerBacking.cpp	2017-02-17 00:56:04 UTC (rev 212491)
@@ -121,8 +121,6 @@
         tiledBacking->setIsInWindow(page->isInWindow());
 
         if (m_isMainFrameLayerWithTiledBacking && page) {
-            tiledBacking->setUnparentsOffscreenTiles(true);
-
             tiledBacking->setScrollingPerformanceLoggingEnabled(page->settings().scrollingPerformanceLoggingEnabled());
             adjustTiledBackingCoverage();
         }

Modified: branches/safari-603-branch/Source/WebKit2/ChangeLog (212490 => 212491)


--- branches/safari-603-branch/Source/WebKit2/ChangeLog	2017-02-17 00:55:59 UTC (rev 212490)
+++ branches/safari-603-branch/Source/WebKit2/ChangeLog	2017-02-17 00:56:04 UTC (rev 212491)
@@ -1,5 +1,21 @@
 2017-02-16  Matthew Hanson  <[email protected]>
 
+        Merge r211688. rdar://problem/30467177
+
+    2017-02-05  Simon Fraser  <[email protected]>
+
+            Remove unparentsOffscreenTiles logic in TileController
+            https://bugs.webkit.org/show_bug.cgi?id=167823
+
+            Reviewed by Tim Horton.
+
+            Drive-by fix: make sure we put the tiled scrolling indicator's layer back when switching tabs.
+
+            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+            (WebKit::TiledCoreAnimationDrawingArea::updateRootLayers):
+
+2017-02-16  Matthew Hanson  <[email protected]>
+
         Merge r212398. rdar://problem/29906848
 
     2017-02-15  Jer Noble  <[email protected]>

Modified: branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (212490 => 212491)


--- branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2017-02-17 00:55:59 UTC (rev 212490)
+++ branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2017-02-17 00:56:04 UTC (rev 212491)
@@ -226,6 +226,9 @@
     }
 
     [m_hostingLayer setSublayers:m_viewOverlayRootLayer ? @[ m_rootLayer.get(), m_viewOverlayRootLayer->platformLayer() ] : @[ m_rootLayer.get() ]];
+    
+    if (m_debugInfoLayer)
+        [m_hostingLayer addSublayer:m_debugInfoLayer.get()];
 }
 
 void TiledCoreAnimationDrawingArea::attachViewOverlayGraphicsLayer(Frame* frame, GraphicsLayer* viewOverlayRootLayer)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to