Title: [163646] trunk/Source/WebKit2
- Revision
- 163646
- Author
- d...@apple.com
- Date
- 2014-02-07 14:12:03 -0800 (Fri, 07 Feb 2014)
Log Message
WebGL doesn't update with remotely hosted layers
https://bugs.webkit.org/show_bug.cgi?id=128390
Reviewed by Simon Fraser.
PlatformCALayerRemote was intercepting the setNeedsDisplay calls to
WebGL layers, and thus causing them to not draw. Fix this by adding an
override in PlatformCALayerRemoteCustom to check if it is a WebGLLayer
and call setNeedsDisplay directly.
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
(PlatformCALayerRemoteCustom::setNeedsDisplay):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (163645 => 163646)
--- trunk/Source/WebKit2/ChangeLog 2014-02-07 22:01:38 UTC (rev 163645)
+++ trunk/Source/WebKit2/ChangeLog 2014-02-07 22:12:03 UTC (rev 163646)
@@ -1,3 +1,20 @@
+2014-02-07 Dean Jackson <d...@apple.com>
+
+ WebGL doesn't update with remotely hosted layers
+ https://bugs.webkit.org/show_bug.cgi?id=128390
+
+ Reviewed by Simon Fraser.
+
+ PlatformCALayerRemote was intercepting the setNeedsDisplay calls to
+ WebGL layers, and thus causing them to not draw. Fix this by adding an
+ override in PlatformCALayerRemoteCustom to check if it is a WebGLLayer
+ and call setNeedsDisplay directly.
+
+ * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
+ * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
+ (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
+ (PlatformCALayerRemoteCustom::setNeedsDisplay):
+
2014-02-07 Benjamin Poulain <bpoul...@apple.com>
[WK2] Fitler touch events only based on touch start
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h (163645 => 163646)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h 2014-02-07 22:01:38 UTC (rev 163645)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h 2014-02-07 22:12:03 UTC (rev 163646)
@@ -41,11 +41,14 @@
virtual uint32_t hostingContextID() override;
+ virtual void setNeedsDisplay(const WebCore::FloatRect* dirtyRect = 0) override;
+
private:
PlatformCALayerRemoteCustom(PlatformLayer*, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext*);
std::unique_ptr<LayerHostingContext> m_layerHostingContext;
RetainPtr<PlatformLayer> m_platformLayer;
+ bool m_providesContents;
};
} // namespace WebKit
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm (163645 => 163646)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm 2014-02-07 22:01:38 UTC (rev 163645)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm 2014-02-07 22:12:03 UTC (rev 163646)
@@ -57,6 +57,8 @@
m_platformLayer = customLayer;
[customLayer web_disableAllActions];
+
+ m_providesContents = [customLayer isKindOfClass:NSClassFromString(@"WebGLLayer")];
}
PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom()
@@ -67,3 +69,14 @@
{
return m_layerHostingContext->contextID();
}
+
+void PlatformCALayerRemoteCustom::setNeedsDisplay(const FloatRect* rect)
+{
+ if (m_providesContents) {
+ if (rect)
+ [m_platformLayer setNeedsDisplayInRect:*rect];
+ else
+ [m_platformLayer setNeedsDisplay];
+ } else
+ PlatformCALayerRemote::setNeedsDisplay(rect);
+}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes