Title: [212439] trunk/Source
Revision
212439
Author
simon.fra...@apple.com
Date
2017-02-16 09:32:34 -0800 (Thu, 16 Feb 2017)

Log Message

Clean up use of some CALayer-related SPI
https://bugs.webkit.org/show_bug.cgi?id=168401

Reviewed by Tim Horton.

Source/WebCore:

Use -setDrawsAsynchronously: rather than the old -setAcceleratesDrawing: SPI.

Remove CATiledLayer-related stuff from QuartzCoreSPI.h, since we don't use it any more.

* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::acceleratesDrawing):
(PlatformCALayerCocoa::setAcceleratesDrawing):
* platform/graphics/ca/cocoa/WebTiledBackingLayer.mm:
(-[WebTiledBackingLayer setDrawsAsynchronously:]): This override passes the state
onto the TileController.
(-[WebTiledBackingLayer setAcceleratesDrawing:]): Deleted.
* platform/ios/LegacyTileGridTile.mm:
(WebCore::LegacyTileGridTile::LegacyTileGridTile):
* platform/spi/cocoa/QuartzCoreSPI.h:

Source/WebKit/mac:

Include CALayer.h not CATiledLayer.h.

* WebInspector/WebNodeHighlight.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (212438 => 212439)


--- trunk/Source/WebCore/ChangeLog	2017-02-16 17:32:12 UTC (rev 212438)
+++ trunk/Source/WebCore/ChangeLog	2017-02-16 17:32:34 UTC (rev 212439)
@@ -1,3 +1,25 @@
+2017-02-16  Simon Fraser  <simon.fra...@apple.com>
+
+        Clean up use of some CALayer-related SPI
+        https://bugs.webkit.org/show_bug.cgi?id=168401
+
+        Reviewed by Tim Horton.
+
+        Use -setDrawsAsynchronously: rather than the old -setAcceleratesDrawing: SPI.
+
+        Remove CATiledLayer-related stuff from QuartzCoreSPI.h, since we don't use it any more.
+
+        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
+        (PlatformCALayerCocoa::acceleratesDrawing):
+        (PlatformCALayerCocoa::setAcceleratesDrawing):
+        * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm:
+        (-[WebTiledBackingLayer setDrawsAsynchronously:]): This override passes the state
+        onto the TileController.
+        (-[WebTiledBackingLayer setAcceleratesDrawing:]): Deleted.
+        * platform/ios/LegacyTileGridTile.mm:
+        (WebCore::LegacyTileGridTile::LegacyTileGridTile):
+        * platform/spi/cocoa/QuartzCoreSPI.h:
+
 2017-02-16  Yusuke Suzuki  <utatane....@gmail.com>
 
         Web Inspector: allow import() inside the inspector

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


--- trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm	2017-02-16 17:32:12 UTC (rev 212438)
+++ trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm	2017-02-16 17:32:34 UTC (rev 212439)
@@ -686,13 +686,13 @@
 
 bool PlatformCALayerCocoa::acceleratesDrawing() const
 {
-    return [m_layer acceleratesDrawing];
+    return [m_layer drawsAsynchronously];
 }
 
 void PlatformCALayerCocoa::setAcceleratesDrawing(bool acceleratesDrawing)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS
-    [m_layer setAcceleratesDrawing:acceleratesDrawing];
+    [m_layer setDrawsAsynchronously:acceleratesDrawing];
     END_BLOCK_OBJC_EXCEPTIONS
 }
 

Modified: trunk/Source/WebCore/platform/graphics/ca/cocoa/WebTiledBackingLayer.mm (212438 => 212439)


--- trunk/Source/WebCore/platform/graphics/ca/cocoa/WebTiledBackingLayer.mm	2017-02-16 17:32:12 UTC (rev 212438)
+++ trunk/Source/WebCore/platform/graphics/ca/cocoa/WebTiledBackingLayer.mm	2017-02-16 17:32:34 UTC (rev 212439)
@@ -103,7 +103,7 @@
     _tileController->setNeedsDisplayInRect(enclosingIntRect(rect));
 }
 
-- (void)setAcceleratesDrawing:(BOOL)acceleratesDrawing
+- (void)setDrawsAsynchronously:(BOOL)acceleratesDrawing
 {
     _tileController->setAcceleratesDrawing(acceleratesDrawing);
 }

Modified: trunk/Source/WebCore/platform/ios/LegacyTileGridTile.mm (212438 => 212439)


--- trunk/Source/WebCore/platform/ios/LegacyTileGridTile.mm	2017-02-16 17:32:12 UTC (rev 212438)
+++ trunk/Source/WebCore/platform/ios/LegacyTileGridTile.mm	2017-02-16 17:32:34 UTC (rev 212439)
@@ -70,7 +70,7 @@
     [layer setEdgeAntialiasingMask:0];
     [layer setNeedsLayoutOnGeometryChange:NO];
     [layer setContentsScale:screenScale];
-    [layer setAcceleratesDrawing:m_tileGrid->tileCache().acceleratedDrawingEnabled()];
+    [layer setDrawsAsynchronously:m_tileGrid->tileCache().acceleratedDrawingEnabled()];
 
     // Host layer may have other sublayers. Keep the tile layers at the beginning of the array
     // so they are painted behind everything else.

Modified: trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h (212438 => 212439)


--- trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h	2017-02-16 17:32:12 UTC (rev 212438)
+++ trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h	2017-02-16 17:32:34 UTC (rev 212439)
@@ -78,7 +78,6 @@
 - (CGSize)size;
 - (void *)regionBeingDrawn;
 - (void)setContentsChanged;
-@property BOOL acceleratesDrawing;
 @property BOOL allowsGroupBlending;
 @property BOOL canDrawConcurrently;
 @property BOOL contentsOpaque;
@@ -90,11 +89,6 @@
 #endif
 @end
 
-@interface CATiledLayer ()
-- (void)displayInRect:(CGRect)rect levelOfDetail:(int)levelOfDetail options:(NSDictionary *)dictionary;
-- (void)setNeedsDisplayInRect:(CGRect)rect levelOfDetail:(int)levelOfDetail options:(NSDictionary *)dictionary;
-@end
-
 #if PLATFORM(IOS)
 @interface CADisplay : NSObject
 @end
@@ -197,8 +191,6 @@
 
 WTF_EXTERN_C_END
 
-extern NSString * const kCATiledLayerRemoveImmediately;
-
 extern NSString * const kCAFilterColorInvert;
 extern NSString * const kCAFilterColorMatrix;
 extern NSString * const kCAFilterColorMonochrome;

Modified: trunk/Source/WebKit/mac/ChangeLog (212438 => 212439)


--- trunk/Source/WebKit/mac/ChangeLog	2017-02-16 17:32:12 UTC (rev 212438)
+++ trunk/Source/WebKit/mac/ChangeLog	2017-02-16 17:32:34 UTC (rev 212439)
@@ -1,3 +1,14 @@
+2017-02-16  Simon Fraser  <simon.fra...@apple.com>
+
+        Clean up use of some CALayer-related SPI
+        https://bugs.webkit.org/show_bug.cgi?id=168401
+
+        Reviewed by Tim Horton.
+
+        Include CALayer.h not CATiledLayer.h.
+
+        * WebInspector/WebNodeHighlight.h:
+
 2017-02-15  Wenson Hsieh  <wenson_hs...@apple.com>
 
         Fix the build after r212379

Modified: trunk/Source/WebKit/mac/WebInspector/WebNodeHighlight.h (212438 => 212439)


--- trunk/Source/WebKit/mac/WebInspector/WebNodeHighlight.h	2017-02-16 17:32:12 UTC (rev 212438)
+++ trunk/Source/WebKit/mac/WebInspector/WebNodeHighlight.h	2017-02-16 17:32:34 UTC (rev 212439)
@@ -27,7 +27,7 @@
  */
 
 #if PLATFORM(IOS)
-#import <QuartzCore/CATiledLayer.h>
+#import <QuartzCore/CALayer.h>
 #import <WebKitLegacy/WAKAppKitStubs.h>
 #import <WebKitLegacy/WAKView.h>
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to