Title: [170285] trunk/Source/WebCore
Revision
170285
Author
[email protected]
Date
2014-06-23 01:04:35 -0700 (Mon, 23 Jun 2014)

Log Message

[iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=134183

Reviewed by Sam Weinig.

GraphicsContext3D has a reference to a WebGLLayer that was
hidden behind a PlatformLayer. This meant we had to cast it
to use a WebGLLayer method.

* platform/graphics/GraphicsContext3D.h: Replace RefPtr<PlatformLayer>
with RefPtr<WebGLLayer>.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::~GraphicsContext3D): No need to cast.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (170284 => 170285)


--- trunk/Source/WebCore/ChangeLog	2014-06-23 07:27:05 UTC (rev 170284)
+++ trunk/Source/WebCore/ChangeLog	2014-06-23 08:04:35 UTC (rev 170285)
@@ -1,3 +1,19 @@
+2014-06-23  Dean Jackson  <[email protected]>
+
+        [iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
+        https://bugs.webkit.org/show_bug.cgi?id=134183
+
+        Reviewed by Sam Weinig.
+
+        GraphicsContext3D has a reference to a WebGLLayer that was
+        hidden behind a PlatformLayer. This meant we had to cast it
+        to use a WebGLLayer method.
+
+        * platform/graphics/GraphicsContext3D.h: Replace RefPtr<PlatformLayer>
+        with RefPtr<WebGLLayer>.
+        * platform/graphics/mac/GraphicsContext3DMac.mm:
+        (WebCore::GraphicsContext3D::~GraphicsContext3D): No need to cast.
+
 2014-06-22  Zalan Bujtas  <[email protected]>
 
         Make offset from ancestor computation explicit by moving it to the callers.

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (170284 => 170285)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h	2014-06-23 07:27:05 UTC (rev 170284)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h	2014-06-23 08:04:35 UTC (rev 170285)
@@ -1002,12 +1002,14 @@
     int m_currentWidth, m_currentHeight;
     bool isResourceSafe();
 
+#if PLATFORM(COCOA)
+    RetainPtr<WebGLLayer> m_webGLLayer;
+#endif
+
 #if PLATFORM(IOS)
     PlatformGraphicsContext3D m_contextObj;
-    RetainPtr<PlatformLayer> m_webGLLayer;
 #elif PLATFORM(MAC)
     CGLContextObj m_contextObj;
-    RetainPtr<WebGLLayer> m_webGLLayer;
 #elif PLATFORM(WIN) && USE(CA)
     RefPtr<PlatformCALayer> m_webGLLayer;
 #endif

Modified: trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm (170284 => 170285)


--- trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm	2014-06-23 07:27:05 UTC (rev 170284)
+++ trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm	2014-06-23 08:04:35 UTC (rev 170285)
@@ -332,7 +332,7 @@
         CGLSetCurrentContext(0);
         CGLDestroyContext(m_contextObj);
 #endif
-        [static_cast<WebGLLayer*>(m_webGLLayer) setContext:nullptr];
+        [m_webGLLayer setContext:nullptr];
         numActiveContexts--;
     }
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to