[iOS WebKit2] Disable tile cohort retention for now
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Mar 2014 19:37:30 +0000 (19:37 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Mar 2014 19:37:30 +0000 (19:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=130926
<rdar://problem/16465413>

Reviewed by Simon Fraser.

* WebCore.exp.in:
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setScrollingPerformanceLoggingEnabled):
(WebCore::Settings::setAggressiveTileRetentionEnabled): Deleted.
* page/Settings.h:
(WebCore::Settings::aggressiveTileRetentionEnabled): Deleted.
* page/Settings.in:
Use Settings.in for these simple settings.

* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::shouldAggressivelyRetainTiles):
(WebCore::GraphicsLayerClient::shouldTemporarilyRetainTileCohorts):
* platform/graphics/TiledBacking.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::platformCALayerShouldAggressivelyRetainTiles):
(WebCore::GraphicsLayerCA::platformCALayerShouldTemporarilyRetainTileCohorts):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayerClient.h:
(WebCore::PlatformCALayerClient::platformCALayerShouldAggressivelyRetainTiles):
(WebCore::PlatformCALayerClient::platformCALayerShouldTemporarilyRetainTileCohorts):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::shouldAggressivelyRetainTiles):
(WebCore::RenderLayerBacking::shouldTemporarilyRetainTileCohorts):
* rendering/RenderLayerBacking.h:
Plumb the two tile-retention settings through to TileController in a pull manner
instead of a push manner, as there were some cases (especially on iOS) where
the settings weren't always getting pushed down.

* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
(WebCore::TileController::tileRevalidationTimerFired):
(WebCore::TileController::revalidateTiles):
(WebCore::TileController::drawTileMapContents):
Aggressive tile retention wins over temporary retention. If we aren't
using temporary (cohort) retention, throw away the cohort as soon as it
is created.

* Shared/WebPreferencesStore.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Add a preference for temporary tile cohort retention (essentially, provide a setting
that means that we will never retain tiles at all once they leave the tile coverage rect).
Defaults to true to maintain existing behavior, except for iOS WebKit2, where
it defaults to false because we don't have the requisite support for purgeable tiles yet.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):

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

18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/page/Settings.in
Source/WebCore/platform/graphics/GraphicsLayerClient.h
Source/WebCore/platform/graphics/TiledBacking.h
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h
Source/WebCore/platform/graphics/ca/mac/TileController.h
Source/WebCore/platform/graphics/ca/mac/TileController.mm
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesStore.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

index 5086e3d..1e9ac30 100644 (file)
@@ -1,3 +1,50 @@
+2014-03-31  Tim Horton  <timothy_horton@apple.com>
+
+        [iOS WebKit2] Disable tile cohort retention for now
+        https://bugs.webkit.org/show_bug.cgi?id=130926
+        <rdar://problem/16465413>
+
+        Reviewed by Simon Fraser.
+
+        * WebCore.exp.in:
+        * page/Settings.cpp:
+        (WebCore::Settings::Settings):
+        (WebCore::Settings::setScrollingPerformanceLoggingEnabled):
+        (WebCore::Settings::setAggressiveTileRetentionEnabled): Deleted.
+        * page/Settings.h:
+        (WebCore::Settings::aggressiveTileRetentionEnabled): Deleted.
+        * page/Settings.in:
+        Use Settings.in for these simple settings.
+
+        * platform/graphics/GraphicsLayerClient.h:
+        (WebCore::GraphicsLayerClient::shouldAggressivelyRetainTiles):
+        (WebCore::GraphicsLayerClient::shouldTemporarilyRetainTileCohorts):
+        * platform/graphics/TiledBacking.h:
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::platformCALayerShouldAggressivelyRetainTiles):
+        (WebCore::GraphicsLayerCA::platformCALayerShouldTemporarilyRetainTileCohorts):
+        * platform/graphics/ca/GraphicsLayerCA.h:
+        * platform/graphics/ca/PlatformCALayerClient.h:
+        (WebCore::PlatformCALayerClient::platformCALayerShouldAggressivelyRetainTiles):
+        (WebCore::PlatformCALayerClient::platformCALayerShouldTemporarilyRetainTileCohorts):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::shouldAggressivelyRetainTiles):
+        (WebCore::RenderLayerBacking::shouldTemporarilyRetainTileCohorts):
+        * rendering/RenderLayerBacking.h:
+        Plumb the two tile-retention settings through to TileController in a pull manner
+        instead of a push manner, as there were some cases (especially on iOS) where
+        the settings weren't always getting pushed down.
+
+        * platform/graphics/ca/mac/TileController.h:
+        * platform/graphics/ca/mac/TileController.mm:
+        (WebCore::TileController::TileController):
+        (WebCore::TileController::tileRevalidationTimerFired):
+        (WebCore::TileController::revalidateTiles):
+        (WebCore::TileController::drawTileMapContents):
+        Aggressive tile retention wins over temporary retention. If we aren't
+        using temporary (cohort) retention, throw away the cohort as soon as it
+        is created.
+
 2014-03-31  Beth Dakin  <bdakin@apple.com>
 
         Radio buttons and checkboxes should share code
index 49f1f1d..d541e42 100644 (file)
@@ -1282,7 +1282,6 @@ __ZN7WebCore8Settings32defaultDOMTimerAlignmentIntervalEv
 __ZN7WebCore8Settings32setAcceleratedCompositingEnabledEb
 __ZN7WebCore8Settings32setNeedsAdobeFrameReloadingQuirkEb
 __ZN7WebCore8Settings32setScreenFontSubstitutionEnabledEb
-__ZN7WebCore8Settings33setAggressiveTileRetentionEnabledEb
 __ZN7WebCore8Settings33setFontFallbackPrefersPictographsEb
 __ZN7WebCore8Settings35setBackgroundShouldExtendBeyondPageEb
 __ZN7WebCore8Settings37setScrollingPerformanceLoggingEnabledEb
@@ -1650,7 +1649,9 @@ __ZNK7WebCore15GraphicsLayerCA26backingStoreMemoryEstimateEv
 __ZNK7WebCore15GraphicsLayerCA30visibleRectChangeRequiresFlushERKNS_9FloatRectE
 __ZNK7WebCore15GraphicsLayerCA32platformCALayerDeviceScaleFactorEv
 __ZNK7WebCore15GraphicsLayerCA33platformCALayerShowRepaintCounterEPNS_15PlatformCALayerE
+__ZNK7WebCore15GraphicsLayerCA44platformCALayerShouldAggressivelyRetainTilesEPNS_15PlatformCALayerE
 __ZNK7WebCore15GraphicsLayerCA49platformCALayerContentsScaleMultiplierForNewTilesEPNS_15PlatformCALayerE
+__ZNK7WebCore15GraphicsLayerCA49platformCALayerShouldTemporarilyRetainTileCohortsEPNS_15PlatformCALayerE
 __ZNK7WebCore15ProgressTracker17estimatedProgressEv
 __ZNK7WebCore15ProtectionSpace10serverTypeEv
 __ZNK7WebCore15ProtectionSpace26receivesCredentialSecurelyEv
@@ -1960,7 +1961,9 @@ __ZThn???_N7WebCore15GraphicsLayerCA40platformCALayerSetNeedsToRevalidateTilesEv
 __ZThn???_NK7WebCore15GraphicsLayerCA26platformCALayerExposedRectEv
 __ZThn???_NK7WebCore15GraphicsLayerCA32platformCALayerDeviceScaleFactorEv
 __ZThn???_NK7WebCore15GraphicsLayerCA33platformCALayerShowRepaintCounterEPNS_15PlatformCALayerE
+__ZThn???_NK7WebCore15GraphicsLayerCA44platformCALayerShouldAggressivelyRetainTilesEPNS_15PlatformCALayerE
 __ZThn???_NK7WebCore15GraphicsLayerCA49platformCALayerContentsScaleMultiplierForNewTilesEPNS_15PlatformCALayerE
+__ZThn???_NK7WebCore15GraphicsLayerCA49platformCALayerShouldTemporarilyRetainTileCohortsEPNS_15PlatformCALayerE
 _filenameByFixingIllegalCharacters
 _hasCaseInsensitivePrefix
 _hasCaseInsensitiveSubstring
index 32b5a7f..8e0ed2f 100644 (file)
@@ -186,7 +186,6 @@ Settings::Settings(Page* page)
     , m_touchEventEmulationEnabled(false)
 #endif
     , m_scrollingPerformanceLoggingEnabled(false)
-    , m_aggressiveTileRetentionEnabled(false)
     , m_timeWithoutMouseMovementBeforeHidingControls(3)
     , m_setImageLoadingSettingsTimer(this, &Settings::imageLoadingSettingsTimerFired)
 #if ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
@@ -628,11 +627,6 @@ void Settings::setScrollingPerformanceLoggingEnabled(bool enabled)
     if (m_page->mainFrame().view())
         m_page->mainFrame().view()->setScrollingPerformanceLoggingEnabled(enabled);
 }
-    
-void Settings::setAggressiveTileRetentionEnabled(bool enabled)
-{
-    m_aggressiveTileRetentionEnabled = enabled;
-}
 
 void Settings::setMockScrollbarsEnabled(bool flag)
 {
index 516f0dc..a4ec930 100644 (file)
@@ -233,9 +233,6 @@ public:
 
     void setScrollingPerformanceLoggingEnabled(bool);
     bool scrollingPerformanceLoggingEnabled() { return m_scrollingPerformanceLoggingEnabled; }
-        
-    void setAggressiveTileRetentionEnabled(bool);
-    bool aggressiveTileRetentionEnabled() { return m_aggressiveTileRetentionEnabled; }
 
     static void setShouldRespectPriorityInCSSAttributeSetters(bool);
     static bool shouldRespectPriorityInCSSAttributeSetters();
@@ -317,7 +314,6 @@ private:
     bool m_touchEventEmulationEnabled : 1;
 #endif
     bool m_scrollingPerformanceLoggingEnabled : 1;
-    bool m_aggressiveTileRetentionEnabled : 1;
 
     double m_timeWithoutMouseMovementBeforeHidingControls;
 
index ffaf156..7f75f14 100644 (file)
@@ -220,3 +220,6 @@ imageControlsEnabled initial=false, conditional=IMAGE_CONTROLS
 alwaysUseBaselineOfPrimaryFont initial=false
 
 enableInheritURIQueryComponent initial=false
+
+aggressiveTileRetentionEnabled initial=false
+temporaryTileCohortRetentionEnabled initial=true
index 3d24224..5aadbae 100644 (file)
@@ -95,6 +95,9 @@ public:
     virtual bool shouldSkipLayerInDump(const GraphicsLayer*) const { return false; }
     virtual bool shouldDumpPropertyForLayer(const GraphicsLayer*, const char*) const { return true; }
 
+    virtual bool shouldAggressivelyRetainTiles(const GraphicsLayer*) const { return false; }
+    virtual bool shouldTemporarilyRetainTileCohorts(const GraphicsLayer*) const { return true; }
+
 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
     virtual bool mediaLayerMustBeUpdatedOnMainThread() const { return false; }
 #endif
index e0165e0..483078d 100644 (file)
@@ -75,9 +75,6 @@ public:
     virtual void setScrollingPerformanceLoggingEnabled(bool) = 0;
     virtual bool scrollingPerformanceLoggingEnabled() const = 0;
     
-    virtual void setAggressivelyRetainsTiles(bool) = 0;
-    virtual bool aggressivelyRetainsTiles() const = 0;
-    
     virtual void setUnparentsOffscreenTiles(bool) = 0;
     virtual bool unparentsOffscreenTiles() const = 0;
     
index 143510a..217cbce 100644 (file)
@@ -1294,6 +1294,20 @@ float GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles(Platfor
     return client() ? client()->contentsScaleMultiplierForNewTiles(this) : 1;
 }
 
+bool GraphicsLayerCA::platformCALayerShouldAggressivelyRetainTiles(PlatformCALayer*) const
+{
+    if (GraphicsLayerClient* layerClient = client())
+        return layerClient->shouldAggressivelyRetainTiles(this);
+    return false;
+}
+
+bool GraphicsLayerCA::platformCALayerShouldTemporarilyRetainTileCohorts(PlatformCALayer*) const
+{
+    if (GraphicsLayerClient* layerClient = client())
+        return layerClient->shouldTemporarilyRetainTileCohorts(this);
+    return true;
+}
+
 void GraphicsLayerCA::commitLayerChangesBeforeSublayers(CommitState& commitState, float pageScaleFactor, const FloatPoint& positionRelativeToBase, const FloatRect& oldVisibleRect, TransformationMatrix* transformFromRoot)
 {
     ++commitState.treeDepth;
index 2a43d1f..fb2aff4 100644 (file)
@@ -193,6 +193,8 @@ private:
     virtual void platformCALayerSetNeedsToRevalidateTiles() override;
     virtual float platformCALayerDeviceScaleFactor() const override;
     virtual float platformCALayerContentsScaleMultiplierForNewTiles(PlatformCALayer*) const override;
+    virtual bool platformCALayerShouldAggressivelyRetainTiles(PlatformCALayer*) const override;
+    virtual bool platformCALayerShouldTemporarilyRetainTileCohorts(PlatformCALayer*) const override;
 
     virtual bool isCommittingChanges() const override { return m_isCommittingChanges; }
 
index 9b23432..6f5661b 100644 (file)
@@ -54,6 +54,9 @@ public:
     virtual float platformCALayerDeviceScaleFactor() const = 0;
     virtual float platformCALayerContentsScaleMultiplierForNewTiles(PlatformCALayer*) const { return 1; }
 
+    virtual bool platformCALayerShouldAggressivelyRetainTiles(PlatformCALayer*) const { return false; }
+    virtual bool platformCALayerShouldTemporarilyRetainTileCohorts(PlatformCALayer*) const { return true; }
+
     virtual bool isCommittingChanges() const { return false; }
 
 protected:
index f74e08b..418f386 100644 (file)
@@ -118,8 +118,6 @@ private:
     virtual IntRect tileGridExtent() const override;
     virtual void setScrollingPerformanceLoggingEnabled(bool flag) override { m_scrollingPerformanceLoggingEnabled = flag; }
     virtual bool scrollingPerformanceLoggingEnabled() const override { return m_scrollingPerformanceLoggingEnabled; }
-    virtual void setAggressivelyRetainsTiles(bool flag) override { m_aggressivelyRetainsTiles = flag; }
-    virtual bool aggressivelyRetainsTiles() const override { return m_aggressivelyRetainsTiles; }
     virtual void setUnparentsOffscreenTiles(bool flag) override { m_unparentsOffscreenTiles = flag; }
     virtual bool unparentsOffscreenTiles() const override { return m_unparentsOffscreenTiles; }
     virtual double retainedTileBackingStoreMemory() const override;
@@ -245,7 +243,6 @@ private:
 
     bool m_isInWindow;
     bool m_scrollingPerformanceLoggingEnabled;
-    bool m_aggressivelyRetainsTiles;
     bool m_unparentsOffscreenTiles;
     bool m_acceleratesDrawing;
     bool m_tilesAreOpaque;
index fe3e80e..5d857b5 100644 (file)
@@ -67,7 +67,6 @@ TileController::TileController(PlatformCALayer* rootPlatformLayer)
     , m_marginRight(0)
     , m_isInWindow(false)
     , m_scrollingPerformanceLoggingEnabled(false)
-    , m_aggressivelyRetainsTiles(false)
     , m_unparentsOffscreenTiles(false)
     , m_acceleratesDrawing(false)
     , m_tilesAreOpaque(false)
@@ -543,7 +542,7 @@ void TileController::tileRevalidationTimerFired(Timer<TileController>*)
         return;
     }
 
-    TileValidationPolicyFlags foregroundValidationPolicy = m_aggressivelyRetainsTiles ? 0 : PruneSecondaryTiles;
+    TileValidationPolicyFlags foregroundValidationPolicy = owningGraphicsLayer()->platformCALayerShouldAggressivelyRetainTiles(m_tileCacheLayer) ? 0 : PruneSecondaryTiles;
     TileValidationPolicyFlags backgroundValidationPolicy = foregroundValidationPolicy | UnparentAllTiles;
 
     revalidateTiles(foregroundValidationPolicy, backgroundValidationPolicy);
@@ -698,8 +697,12 @@ void TileController::revalidateTiles(TileValidationPolicyFlags foregroundValidat
     if (tilesInCohort)
         startedNewCohort(currCohort);
 
-    if (!m_aggressivelyRetainsTiles)
-        scheduleCohortRemoval();
+    if (!owningGraphicsLayer()->platformCALayerShouldAggressivelyRetainTiles(m_tileCacheLayer)) {
+        if (owningGraphicsLayer()->platformCALayerShouldTemporarilyRetainTileCohorts(m_tileCacheLayer))
+            scheduleCohortRemoval();
+        else if (tilesInCohort)
+            removeTilesInCohort(currCohort);
+    }
 
     // Ensure primary tile coverage tiles.
     m_primaryTileCoverageRect = ensureTilesForRect(tileCoverageRect, CoverageType::PrimaryTiles);
@@ -1114,7 +1117,7 @@ void TileController::drawTileMapContents(CGContextRef context, CGRect layerBound
         TileCohort newestCohort = newestTileCohort();
         TileCohort oldestCohort = oldestTileCohort();
 
-        if (!m_aggressivelyRetainsTiles && tileInfo.cohort != VisibleTileCohort && newestCohort > oldestCohort) {
+        if (!owningGraphicsLayer()->platformCALayerShouldAggressivelyRetainTiles(m_tileCacheLayer) && tileInfo.cohort != VisibleTileCohort && newestCohort > oldestCohort) {
             float cohortProportion = static_cast<float>((newestCohort - tileInfo.cohort)) / (newestCohort - oldestCohort);
             CGContextSetRGBFillColor(context, red, green, blue, 1 - cohortProportion);
         } else
index a830875..f784ee3 100644 (file)
@@ -2315,6 +2315,25 @@ bool RenderLayerBacking::shouldDumpPropertyForLayer(const GraphicsLayer* layer,
     return true;
 }
 
+bool RenderLayerBacking::shouldAggressivelyRetainTiles(const GraphicsLayer*) const
+{
+    // Only the main frame TileController has enough information about in-window state to
+    // correctly implement aggressive tile retention.
+    if (!m_isMainFrameRenderViewLayer)
+        return false;
+
+    if (Page* page = renderer().frame().page())
+        return page->settings().aggressiveTileRetentionEnabled();
+    return false;
+}
+
+bool RenderLayerBacking::shouldTemporarilyRetainTileCohorts(const GraphicsLayer*) const
+{
+    if (Page* page = renderer().frame().page())
+        return page->settings().temporaryTileCohortRetentionEnabled();
+    return true;
+}
+
 #ifndef NDEBUG
 void RenderLayerBacking::verifyNotPainting()
 {
index 25ce7fc..acd0eeb 100644 (file)
@@ -187,6 +187,9 @@ public:
     virtual bool shouldSkipLayerInDump(const GraphicsLayer*) const override;
     virtual bool shouldDumpPropertyForLayer(const GraphicsLayer*, const char* propertyName) const override;
 
+    virtual bool shouldAggressivelyRetainTiles(const GraphicsLayer*) const override;
+    virtual bool shouldTemporarilyRetainTileCohorts(const GraphicsLayer*) const override;
+
 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
     virtual bool mediaLayerMustBeUpdatedOnMainThread() const override;
 #endif
index 8b0a311..5f229d9 100644 (file)
@@ -1,3 +1,23 @@
+2014-03-31  Tim Horton  <timothy_horton@apple.com>
+
+        [iOS WebKit2] Disable tile cohort retention for now
+        https://bugs.webkit.org/show_bug.cgi?id=130926
+        <rdar://problem/16465413>
+
+        Reviewed by Simon Fraser.
+
+        * Shared/WebPreferencesStore.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+        Add a preference for temporary tile cohort retention (essentially, provide a setting
+        that means that we will never retain tiles at all once they leave the tile coverage rect).
+        Defaults to true to maintain existing behavior, except for iOS WebKit2, where
+        it defaults to false because we don't have the requisite support for purgeable tiles yet.
+
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
+        (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
+
 2014-03-31  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
 
         Buildfix after r166497.
index 9a5326a..9f408b9 100644 (file)
@@ -74,6 +74,7 @@ namespace WebKit {
 #define DEFAULT_PASSWORD_ECHO_ENABLED true
 #define DEFAULT_MEDIA_PLAYBACK_ALLOWS_INLINE false
 #define DEFAULT_MEDIA_PLAYBACK_REQUIRES_USER_GESTURE true
+#define DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED false
 #else
 #define DEFAULT_FRAME_FLATTENING_ENABLED false
 #define DEFAULT_SHOULD_PRINT_BACKGROUNDS false
@@ -84,6 +85,7 @@ namespace WebKit {
 #define DEFAULT_PASSWORD_ECHO_ENABLED false
 #define DEFAULT_MEDIA_PLAYBACK_ALLOWS_INLINE true
 #define DEFAULT_MEDIA_PLAYBACK_REQUIRES_USER_GESTURE false
+#define DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED true
 #endif
 
 #if PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR)
@@ -187,6 +189,7 @@ namespace WebKit {
     macro(UsesEncodingDetector, usesEncodingDetector, Bool, bool, false) \
     macro(TextAutosizingEnabled, textAutosizingEnabled, Bool, bool, false) \
     macro(AggressiveTileRetentionEnabled, aggressiveTileRetentionEnabled, Bool, bool, false) \
+    macro(TemporaryTileCohortRetentionEnabled, temporaryTileCohortRetentionEnabled, Bool, bool, DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED) \
     macro(QTKitEnabled, isQTKitEnabled, Bool, bool, true) \
     macro(LogsPageMessagesToSystemConsoleEnabled, logsPageMessagesToSystemConsoleEnabled, Bool, bool, false) \
     macro(PageVisibilityBasedProcessSuppressionEnabled, pageVisibilityBasedProcessSuppressionEnabled, Bool, bool, true) \
index a05bdda..2d7a38d 100644 (file)
@@ -2551,6 +2551,7 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
     settings.setShowRepaintCounter(store.getBoolValueForKey(WebPreferencesKey::compositingRepaintCountersVisibleKey()));
     settings.setShowTiledScrollingIndicator(store.getBoolValueForKey(WebPreferencesKey::tiledScrollingIndicatorVisibleKey()));
     settings.setAggressiveTileRetentionEnabled(store.getBoolValueForKey(WebPreferencesKey::aggressiveTileRetentionEnabledKey()));
+    settings.setTemporaryTileCohortRetentionEnabled(store.getBoolValueForKey(WebPreferencesKey::temporaryTileCohortRetentionEnabledKey()));
     RuntimeEnabledFeatures::sharedFeatures().setCSSRegionsEnabled(store.getBoolValueForKey(WebPreferencesKey::cssRegionsEnabledKey()));
     RuntimeEnabledFeatures::sharedFeatures().setCSSCompositingEnabled(store.getBoolValueForKey(WebPreferencesKey::cssCompositingEnabledKey()));
 #if ENABLE(CSS_GRID_LAYOUT)
index 3ba6cfd..8386f2d 100644 (file)
@@ -260,9 +260,6 @@ void TiledCoreAnimationDrawingArea::updatePreferences(const WebPreferencesStore&
     }
 #endif
 
-    if (TiledBacking* tiledBacking = mainFrameTiledBacking())
-        tiledBacking->setAggressivelyRetainsTiles(settings.aggressiveTileRetentionEnabled());
-
     for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it) {
         it->value->setAcceleratesDrawing(settings.acceleratedDrawingEnabled());
         it->value->setShowDebugBorder(settings.showDebugBorders());
@@ -583,9 +580,6 @@ void TiledCoreAnimationDrawingArea::setRootCompositingLayer(CALayer *layer)
     for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it)
         [m_hostingLayer addSublayer:it->value->platformLayer()];
 
-    if (TiledBacking* tiledBacking = mainFrameTiledBacking())
-        tiledBacking->setAggressivelyRetainsTiles(m_webPage->corePage()->settings().aggressiveTileRetentionEnabled());
-
     updateDebugInfoLayer(m_webPage->corePage()->settings().showTiledScrollingIndicator());
 
     [CATransaction commit];