Turn on the LayerPool for iOS
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 May 2014 18:35:39 +0000 (18:35 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 May 2014 18:35:39 +0000 (18:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=133299

Reviewed by Antti Koivisto.

* Configurations/WebCore.xcconfig:
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::platformReleaseMemory):
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::createTileLayer):
* platform/graphics/ca/mac/TileGrid.mm:
(WebCore::TileGrid::removeTiles):
Turn on the LayerPool for iOS.
We've used this on Mac for a long time, and the WebKit1
("legacy") iOS TileCache also had a similar pool.
This helps a good bit with flashiness while scrolling.

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

Source/WebCore/ChangeLog
Source/WebCore/Configurations/WebCore.xcconfig
Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm
Source/WebCore/platform/graphics/ca/mac/TileController.mm
Source/WebCore/platform/graphics/ca/mac/TileGrid.mm

index 85c1ae5..ab34538 100644 (file)
@@ -1,3 +1,22 @@
+2014-05-27  Timothy Horton  <timothy_horton@apple.com>
+
+        Turn on the LayerPool for iOS
+        https://bugs.webkit.org/show_bug.cgi?id=133299
+
+        Reviewed by Antti Koivisto.
+
+        * Configurations/WebCore.xcconfig:
+        * platform/cocoa/MemoryPressureHandlerCocoa.mm:
+        (WebCore::MemoryPressureHandler::platformReleaseMemory):
+        * platform/graphics/ca/mac/TileController.mm:
+        (WebCore::TileController::createTileLayer):
+        * platform/graphics/ca/mac/TileGrid.mm:
+        (WebCore::TileGrid::removeTiles):
+        Turn on the LayerPool for iOS.
+        We've used this on Mac for a long time, and the WebKit1
+        ("legacy") iOS TileCache also had a similar pool.
+        This helps a good bit with flashiness while scrolling.
+
 2014-05-27  David Hyatt  <hyatt@apple.com>
 
         REGRESSION: Audio volume scrubber does not show volume level thumb
index 0515080..98f7bc6 100644 (file)
@@ -112,6 +112,6 @@ JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production_macosx = $(SDKROOT)$(PRODUCTION_FR
 JAVASCRIPTCORE_PRIVATE_HEADERS_engineering = $(BUILT_PRODUCTS_DIR)/JavaScriptCore.framework/PrivateHeaders;
 
 EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME));
-EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.tiff *Cursor.png AccessibilityObjectMac.mm AXObjectCacheMac.mm ColorMac.mm Cursor.cpp CursorMac.mm DataTransferMac.mm EditorMac.mm EventHandlerMac.mm EventLoopMac.mm GeolocationServiceMac.mm GraphicsContext3DOpenGLES.cpp IconDatabase.cpp IconMac.mm KillRingMac.mm LocalCurrentGraphicsContext.mm MIMETypeRegistryMac.mm MediaPlayerPrivateQTKit.mm NSScrollerImpDetails.mm NetworkStateNotifierMac.cpp PasteboardMac.mm PlatformEventFactoryMac.mm PlatformMouseEventMac.mm PlatformPasteboardMac.mm PlatformScreenMac.mm PlatformSpeechSynthesizerMac.mm PluginMainThreadScheduler.cpp RunLoopMac.mm SSLKeyGeneratorMac.cpp ScrollingCoordinatorMac.mm ScrollViewMac.mm ScrollbarThemeMac.mm SharedTimerMac.mm SoundMac.mm SystemTimeMac.cpp ThemeMac.mm ThreadCheck.mm UserAgentMac.mm WebAccessibilityObjectWrapperMac.mm WebCoreSystemInterface.mm WebCoreURLResponse.mm WebCoreView.m WebFontCache.mm WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm WidgetMac.mm mac/LayerPool.mm DisplayRefreshMonitorMac.cpp;
+EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.tiff *Cursor.png AccessibilityObjectMac.mm AXObjectCacheMac.mm ColorMac.mm Cursor.cpp CursorMac.mm DataTransferMac.mm EditorMac.mm EventHandlerMac.mm EventLoopMac.mm GeolocationServiceMac.mm GraphicsContext3DOpenGLES.cpp IconDatabase.cpp IconMac.mm KillRingMac.mm LocalCurrentGraphicsContext.mm MIMETypeRegistryMac.mm MediaPlayerPrivateQTKit.mm NSScrollerImpDetails.mm NetworkStateNotifierMac.cpp PasteboardMac.mm PlatformEventFactoryMac.mm PlatformMouseEventMac.mm PlatformPasteboardMac.mm PlatformScreenMac.mm PlatformSpeechSynthesizerMac.mm PluginMainThreadScheduler.cpp RunLoopMac.mm SSLKeyGeneratorMac.cpp ScrollingCoordinatorMac.mm ScrollViewMac.mm ScrollbarThemeMac.mm SharedTimerMac.mm SoundMac.mm SystemTimeMac.cpp ThemeMac.mm ThreadCheck.mm UserAgentMac.mm WebAccessibilityObjectWrapperMac.mm WebCoreSystemInterface.mm WebCoreURLResponse.mm WebCoreView.m WebFontCache.mm WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm WidgetMac.mm DisplayRefreshMonitorMac.cpp;
 EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos);
 EXCLUDED_SOURCE_FILE_NAMES_macosx = *IOS.h *IOS.cpp *IOS.mm JSTouch* JSGesture* DOMGesture* DOMTouch* KillRingNone.cpp WAKAppKitStubs.h WAKClipView.h WAKResponder.h WAKScrollView.h WAKView.h WAKViewPrivate.h WAKWindow.h WKContentObservation.h WKGraphics.h WKTypes.h WKUtilities.h WKView.h WKViewPrivate.h WebCoreThread.h WebCoreThreadMessage.h WebCoreThreadRun.h WebCoreThreadSystemInterface.h;
index 31318be..91c1af0 100644 (file)
@@ -47,12 +47,10 @@ namespace WebCore {
 
 void MemoryPressureHandler::platformReleaseMemory(bool)
 {
-#if PLATFORM(MAC)
     {
         ReliefLogger log("Drain LayerPool");
         LayerPool::sharedPool()->drain();
     }
-#endif
 #if USE(IOSURFACE)
     {
         ReliefLogger log("Drain IOSurfacePool");
index 260fe3d..030fdf9 100644 (file)
@@ -32,9 +32,7 @@
 #import "TileCoverageMap.h"
 #import "TileGrid.h"
 #import "WebLayer.h"
-#if !PLATFORM(IOS)
 #import "LayerPool.h"
-#endif
 #import <wtf/MainThread.h>
 #import <utility>
 
@@ -490,11 +488,7 @@ int TileController::rightMarginWidth() const
 
 RefPtr<PlatformCALayer> TileController::createTileLayer(const IntRect& tileRect, TileGrid& grid)
 {
-#if PLATFORM(IOS)
-    RefPtr<PlatformCALayer> layer;
-#else
     RefPtr<PlatformCALayer> layer = LayerPool::sharedPool()->takeLayerWithSize(tileRect.size());
-#endif
 
     if (layer)
         layer->setOwner(&grid);
index e43fbb0..4a413af 100644 (file)
@@ -268,9 +268,7 @@ void TileGrid::removeTiles(Vector<TileGrid::TileIndex>& toRemove)
         TileInfo tileInfo = m_tiles.take(toRemove[i]);
         tileInfo.layer->removeFromSuperlayer();
         m_tileRepaintCounts.remove(tileInfo.layer.get());
-#if !PLATFORM(IOS)
         LayerPool::sharedPool()->addLayer(tileInfo.layer);
-#endif
     }
 }