Title: [95334] trunk/Source/WebKit/chromium
Revision
95334
Author
nd...@chromium.org
Date
2011-09-16 16:33:23 -0700 (Fri, 16 Sep 2011)

Log Message

[chromium] Create WebGL layer for graphics contexts on demand
https://bugs.webkit.org/show_bug.cgi?id=68288

Reviewed by James Robinson.

* src/GraphicsContext3DChromium.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::platformLayer):
* src/GraphicsContext3DPrivate.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (95333 => 95334)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-09-16 23:24:34 UTC (rev 95333)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-09-16 23:33:23 UTC (rev 95334)
@@ -1,3 +1,15 @@
+2011-09-16  Nat Duca  <nd...@chromium.org>
+
+        [chromium] Create WebGL layer for graphics contexts on demand
+        https://bugs.webkit.org/show_bug.cgi?id=68288
+
+        Reviewed by James Robinson.
+
+        * src/GraphicsContext3DChromium.cpp:
+        (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
+        (WebCore::GraphicsContext3DPrivate::platformLayer):
+        * src/GraphicsContext3DPrivate.h:
+
 2011-09-16  chandra shekar v  <chandra.vall...@motorola.com>
 
         [chromium] compilation failed in target 'webkit_unit_tests'.

Modified: trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp (95333 => 95334)


--- trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp	2011-09-16 23:24:34 UTC (rev 95333)
+++ trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp	2011-09-16 23:33:23 UTC (rev 95334)
@@ -99,9 +99,6 @@
 #error Must port to your platform
 #endif
 {
-#if USE(ACCELERATED_COMPOSITING)
-    m_compositingLayer = WebGLLayerChromium::create(0);
-#endif
 }
 
 GraphicsContext3DPrivate::~GraphicsContext3DPrivate()
@@ -216,8 +213,12 @@
 }
 
 #if USE(ACCELERATED_COMPOSITING)
-WebGLLayerChromium* GraphicsContext3DPrivate::platformLayer() const
+WebGLLayerChromium* GraphicsContext3DPrivate::platformLayer()
 {
+#if USE(ACCELERATED_COMPOSITING)
+    if (!m_compositingLayer)
+        m_compositingLayer = WebGLLayerChromium::create(0);
+#endif
     return m_compositingLayer.get();
 }
 #endif

Modified: trunk/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h (95333 => 95334)


--- trunk/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h	2011-09-16 23:24:34 UTC (rev 95333)
+++ trunk/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h	2011-09-16 23:33:23 UTC (rev 95334)
@@ -104,7 +104,7 @@
     void prepareTexture();
 
 #if USE(ACCELERATED_COMPOSITING)
-    WebGLLayerChromium* platformLayer() const;
+    WebGLLayerChromium* platformLayer();
 #endif
     bool isGLES2Compliant() const;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to