Title: [193876] trunk/Source/WebCore
Revision
193876
Author
simon.fra...@apple.com
Date
2015-12-09 15:51:54 -0800 (Wed, 09 Dec 2015)

Log Message

Adjust layer backing store format
https://bugs.webkit.org/show_bug.cgi?id=152097
rdar://problem/23305376

Reviewed by Tim Horton.

Call setBackingStoreFormat() on UIWebView tile grid layers, and on compositing
layers which can allocate backing store.

* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::setBackingStoreFormat):
(PlatformCALayerCocoa::commonInit):
* platform/ios/LegacyTileGridTile.mm:
(WebCore::setBackingStoreFormat):
(WebCore::LegacyTileGridTile::LegacyTileGridTile):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (193875 => 193876)


--- trunk/Source/WebCore/ChangeLog	2015-12-09 23:40:18 UTC (rev 193875)
+++ trunk/Source/WebCore/ChangeLog	2015-12-09 23:51:54 UTC (rev 193876)
@@ -1,3 +1,21 @@
+2015-12-09  Simon Fraser  <simon.fra...@apple.com>
+
+        Adjust layer backing store format
+        https://bugs.webkit.org/show_bug.cgi?id=152097
+        rdar://problem/23305376
+
+        Reviewed by Tim Horton.
+        
+        Call setBackingStoreFormat() on UIWebView tile grid layers, and on compositing
+        layers which can allocate backing store.
+
+        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
+        (WebCore::setBackingStoreFormat):
+        (PlatformCALayerCocoa::commonInit):
+        * platform/ios/LegacyTileGridTile.mm:
+        (WebCore::setBackingStoreFormat):
+        (WebCore::LegacyTileGridTile::LegacyTileGridTile):
+
 2015-12-09  Brady Eidson  <beid...@apple.com>
 
         Modern IDB: storage/indexeddb/intversion-close-between-events.html fails.

Modified: trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm (193875 => 193876)


--- trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm	2015-12-09 23:40:18 UTC (rev 193875)
+++ trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm	2015-12-09 23:51:54 UTC (rev 193876)
@@ -65,6 +65,16 @@
 @end
 #endif
 
+#if __has_include(<WebKitAdditions/LayerBackingStoreAdditions.mm>)
+#import <WebKitAdditions/LayerBackingStoreAdditions.mm>
+#else
+namespace WebCore {
+static void setBackingStoreFormat(CALayer *)
+{
+}
+} // namespace WebCore
+#endif
+
 SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation)
 
 SOFT_LINK_CLASS(AVFoundation, AVPlayerLayer)
@@ -297,6 +307,9 @@
     else
         [m_layer setDelegate:[WebActionDisablingCALayerDelegate shared]];
 
+    if (m_layerType == LayerTypeWebLayer || m_layerType == LayerTypeTiledBackingTileLayer)
+        setBackingStoreFormat(m_layer.get());
+
     // So that the scrolling thread's performance logging code can find all the tiles, mark this as being a tile.
     if (m_layerType == LayerTypeTiledBackingTileLayer)
         [m_layer setValue:@YES forKey:@"isTile"];

Modified: trunk/Source/WebCore/platform/ios/LegacyTileGridTile.mm (193875 => 193876)


--- trunk/Source/WebCore/platform/ios/LegacyTileGridTile.mm	2015-12-09 23:40:18 UTC (rev 193875)
+++ trunk/Source/WebCore/platform/ios/LegacyTileGridTile.mm	2015-12-09 23:51:54 UTC (rev 193876)
@@ -38,8 +38,18 @@
 #include <algorithm>
 #include <functional>
 
+#if __has_include(<WebKitAdditions/LayerBackingStoreAdditions.mm>)
+#import <WebKitAdditions/LayerBackingStoreAdditions.mm>
+#else
 namespace WebCore {
+static void setBackingStoreFormat(CALayer *)
+{
+}
+} // namespace WebCore
+#endif
 
+namespace WebCore {
+
 #if LOG_TILING
 static int totalTileCount;
 #endif
@@ -60,6 +70,7 @@
         m_tileLayer = adoptNS([[LegacyTileLayer alloc] init]);
     }
     LegacyTileLayer* layer = m_tileLayer.get();
+    setBackingStoreFormat(layer);
     [layer setTileGrid:tileGrid];
     [layer setOpaque:m_tileGrid->tileCache().tilesOpaque()];
     [layer setEdgeAntialiasingMask:0];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to