Diff
Modified: trunk/Source/WebCore/ChangeLog (213939 => 213940)
--- trunk/Source/WebCore/ChangeLog 2017-03-14 21:37:41 UTC (rev 213939)
+++ trunk/Source/WebCore/ChangeLog 2017-03-14 21:39:22 UTC (rev 213940)
@@ -1,3 +1,23 @@
+2017-03-14 Dean Jackson <d...@apple.com>
+
+ Rename LayerTypeWebGLLayer and use it for both WebGL and WebGPU
+ https://bugs.webkit.org/show_bug.cgi?id=169628
+ <rdar://problems/31047025>
+
+ Reviewed by Simon Fraser.
+
+ Rename LayerTypeWebGLLayer to LayerTypeContentsProvidedLayer
+ and use it for both WebGLLayer and WebGPULayer, to avoid
+ code duplication.
+
+ * platform/graphics/ca/PlatformCALayer.cpp:
+ (WebCore::operator<<):
+ * platform/graphics/ca/PlatformCALayer.h:
+ * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
+ (PlatformCALayerCocoa::layerTypeForPlatformLayer):
+ (PlatformCALayerCocoa::PlatformCALayerCocoa):
+ (PlatformCALayerCocoa::commonInit):
+
2017-03-13 Jer Noble <jer.no...@apple.com>
Make classes used by Media Stream encode/decode friendly
Modified: trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp (213939 => 213940)
--- trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp 2017-03-14 21:37:41 UTC (rev 213939)
+++ trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp 2017-03-14 21:39:22 UTC (rev 213940)
@@ -223,14 +223,9 @@
case PlatformCALayer::LayerTypeAVPlayerLayer:
ts << "av-player-layer";
break;
- case PlatformCALayer::LayerTypeWebGLLayer:
- ts << "web-gl-layer";
+ case PlatformCALayer::LayerTypeContentsProvidedLayer:
+ ts << "contents-provided-layer";
break;
-#if ENABLE(WEBGPU)
- case PlatformCALayer::LayerTypeWebGPULayer:
- ts << "webgpu-layer";
- break;
-#endif
case PlatformCALayer::LayerTypeShapeLayer:
ts << "shape-layer";
break;
Modified: trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h (213939 => 213940)
--- trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h 2017-03-14 21:37:41 UTC (rev 213939)
+++ trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h 2017-03-14 21:39:22 UTC (rev 213940)
@@ -72,10 +72,7 @@
LayerTypeTiledBackingTileLayer,
LayerTypeRootLayer,
LayerTypeAVPlayerLayer,
- LayerTypeWebGLLayer,
-#if ENABLE(WEBGPU)
- LayerTypeWebGPULayer,
-#endif
+ LayerTypeContentsProvidedLayer,
LayerTypeBackdropLayer,
LayerTypeShapeLayer,
LayerTypeLightSystemBackdropLayer,
Modified: trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm (213939 => 213940)
--- trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm 2017-03-14 21:37:41 UTC (rev 213939)
+++ trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm 2017-03-14 21:39:22 UTC (rev 213940)
@@ -196,11 +196,11 @@
return LayerTypeAVPlayerLayer;
if ([layer isKindOfClass:[WebGLLayer class]])
- return LayerTypeWebGLLayer;
+ return LayerTypeContentsProvidedLayer;
#if ENABLE(WEBGPU)
if ([layer isKindOfClass:[WebGPULayer class]])
- return LayerTypeWebGPULayer;
+ return LayerTypeContentsProvidedLayer;
#endif
return LayerTypeCustom;
@@ -254,11 +254,8 @@
case LayerTypeAVPlayerLayer:
layerClass = getAVPlayerLayerClass();
break;
-#if ENABLE(WEBGPU)
- case LayerTypeWebGPULayer:
-#endif
- case LayerTypeWebGLLayer:
- // We don't create PlatformCALayerCocoas wrapped around WebGLLayers.
+ case LayerTypeContentsProvidedLayer:
+ // We don't create PlatformCALayerCocoas wrapped around WebGLLayers or WebGPULayers.
ASSERT_NOT_REACHED();
break;
case LayerTypeShapeLayer:
@@ -295,11 +292,7 @@
[m_layer setValue:[NSValue valueWithPointer:this] forKey:platformCALayerPointer];
// Clear all the implicit animations on the CALayer
-#if ENABLE(WEBGPU)
- if (m_layerType == LayerTypeAVPlayerLayer || m_layerType == LayerTypeWebGLLayer || m_layerType == LayerTypeWebGPULayer || m_layerType == LayerTypeScrollingLayer || m_layerType == LayerTypeCustom)
-#else
- if (m_layerType == LayerTypeAVPlayerLayer || m_layerType == LayerTypeWebGLLayer || m_layerType == LayerTypeScrollingLayer || m_layerType == LayerTypeCustom)
-#endif
+ if (m_layerType == LayerTypeAVPlayerLayer || m_layerType == LayerTypeContentsProvidedLayer || m_layerType == LayerTypeScrollingLayer || m_layerType == LayerTypeCustom)
[m_layer web_disableAllActions];
else
[m_layer setDelegate:[WebActionDisablingCALayerDelegate shared]];
Modified: trunk/Source/WebKit2/ChangeLog (213939 => 213940)
--- trunk/Source/WebKit2/ChangeLog 2017-03-14 21:37:41 UTC (rev 213939)
+++ trunk/Source/WebKit2/ChangeLog 2017-03-14 21:39:22 UTC (rev 213940)
@@ -1,3 +1,27 @@
+2017-03-14 Dean Jackson <d...@apple.com>
+
+ Rename LayerTypeWebGLLayer and use it for both WebGL and WebGPU
+ https://bugs.webkit.org/show_bug.cgi?id=169628
+ <rdar://problems/31047025>
+
+ Reviewed by Simon Fraser.
+
+ Rename LayerTypeWebGLLayer to LayerTypeContentsProvidedLayer
+ and use it for both WebGLLayer and WebGPULayer, to avoid
+ code duplication.
+
+ * Shared/mac/RemoteLayerBackingStore.mm:
+ (WebKit::RemoteLayerBackingStore::drawInContext):
+ * Shared/mac/RemoteLayerTreeTransaction.mm:
+ (WebKit::RemoteLayerTreeTransaction::description):
+ * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
+ (WebKit::RemoteLayerTreeHost::createLayer):
+ * UIProcess/mac/RemoteLayerTreeHost.mm:
+ (WebKit::RemoteLayerTreeHost::createLayer):
+ * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
+ (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
+ (WebKit::PlatformCALayerRemoteCustom::clone):
+
2017-03-13 Jer Noble <jer.no...@apple.com>
Make classes used by Media Stream encode/decode friendly
Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm (213939 => 213940)
--- trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm 2017-03-14 21:37:41 UTC (rev 213939)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm 2017-03-14 21:39:22 UTC (rev 213940)
@@ -358,10 +358,7 @@
case PlatformCALayer::LayerTypePageTiledBackingLayer:
case PlatformCALayer::LayerTypeRootLayer:
case PlatformCALayer::LayerTypeAVPlayerLayer:
- case PlatformCALayer::LayerTypeWebGLLayer:
-#if ENABLE(WEBGPU)
- case PlatformCALayer::LayerTypeWebGPULayer:
-#endif
+ case PlatformCALayer::LayerTypeContentsProvidedLayer:
case PlatformCALayer::LayerTypeShapeLayer:
case PlatformCALayer::LayerTypeScrollingLayer:
case PlatformCALayer::LayerTypeCustom:
Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm (213939 => 213940)
--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm 2017-03-14 21:37:41 UTC (rev 213939)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm 2017-03-14 21:39:22 UTC (rev 213940)
@@ -893,14 +893,9 @@
case PlatformCALayer::LayerTypeAVPlayerLayer:
ts << " (context-id " << createdLayer.hostingContextID << ")";
break;
-#if ENABLE(WEBGPU)
- case PlatformCALayer::LayerTypeWebGPULayer:
+ case PlatformCALayer::LayerTypeContentsProvidedLayer:
ts << " (context-id " << createdLayer.hostingContextID << ")";
break;
-#endif
- case PlatformCALayer::LayerTypeWebGLLayer:
- ts << " (context-id " << createdLayer.hostingContextID << ")";
- break;
case PlatformCALayer::LayerTypeCustom:
ts << " (context-id " << createdLayer.hostingContextID << ")";
break;
Modified: trunk/Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm (213939 => 213940)
--- trunk/Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm 2017-03-14 21:37:41 UTC (rev 213939)
+++ trunk/Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm 2017-03-14 21:39:22 UTC (rev 213940)
@@ -206,10 +206,7 @@
break;
case PlatformCALayer::LayerTypeCustom:
case PlatformCALayer::LayerTypeAVPlayerLayer:
-#if ENABLE(WEBGPU)
- case PlatformCALayer::LayerTypeWebGPULayer:
-#endif
- case PlatformCALayer::LayerTypeWebGLLayer:
+ case PlatformCALayer::LayerTypeContentsProvidedLayer:
if (!m_isDebugLayerTreeHost) {
view = adoptNS([[WKRemoteView alloc] initWithFrame:CGRectZero contextID:properties.hostingContextID]);
if (properties.type == PlatformCALayer::LayerTypeAVPlayerLayer) {
Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm (213939 => 213940)
--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm 2017-03-14 21:37:41 UTC (rev 213939)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm 2017-03-14 21:39:22 UTC (rev 213940)
@@ -254,10 +254,7 @@
break;
case PlatformCALayer::LayerTypeCustom:
case PlatformCALayer::LayerTypeAVPlayerLayer:
-#if ENABLE(WEBGPU)
- case PlatformCALayer::LayerTypeWebGPULayer:
-#endif
- case PlatformCALayer::LayerTypeWebGLLayer:
+ case PlatformCALayer::LayerTypeContentsProvidedLayer:
if (!m_isDebugLayerTreeHost)
layer = WKMakeRenderLayer(properties.hostingContextID);
else
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm (213939 => 213940)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm 2017-03-14 21:37:41 UTC (rev 213939)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm 2017-03-14 21:39:22 UTC (rev 213940)
@@ -82,11 +82,7 @@
m_platformLayer = customLayer;
[customLayer web_disableAllActions];
-#if ENABLE(WEBGPU)
- m_providesContents = layerType == LayerTypeWebGLLayer || layerType == LayerTypeWebGPULayer;
-#else
- m_providesContents = layerType == LayerTypeWebGLLayer;
-#endif
+ m_providesContents = layerType == LayerTypeContentsProvidedLayer;
properties().position = FloatPoint3D(customLayer.position.x, customLayer.position.y, customLayer.zPosition);
properties().anchorPoint = FloatPoint3D(customLayer.anchorPoint.x, customLayer.anchorPoint.y, customLayer.anchorPointZ);
@@ -125,11 +121,7 @@
}
copyContents = false;
-#if ENABLE(WEBGPU)
- } else if (layerType() == LayerTypeWebGLLayer || layerType() == LayerTypeWebGPULayer) {
-#else
- } else if (layerType() == LayerTypeWebGLLayer) {
-#endif
+ } else if (layerType() == LayerTypeContentsProvidedLayer) {
clonedLayer = adoptNS([[CALayer alloc] init]);
// FIXME: currently copying WebGL contents breaks the original layer.
copyContents = false;