Title: [139186] trunk/Source/WebCore
Revision
139186
Author
[email protected]
Date
2013-01-09 05:31:47 -0800 (Wed, 09 Jan 2013)

Log Message

[Qt] WebGL content is incomplete when using multiple canvas
https://bugs.webkit.org/show_bug.cgi?id=106313

While we are using double buffering for WebGL,
we do not use a drawable that implements a mechanism
for swapping buffers.
Therefore we have to make sure that all GL commands
have been executed properly before copying the texture
onto the GraphicsSurface.

Reviewed by Simon Hausmann.

* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (139185 => 139186)


--- trunk/Source/WebCore/ChangeLog	2013-01-09 12:07:51 UTC (rev 139185)
+++ trunk/Source/WebCore/ChangeLog	2013-01-09 13:31:47 UTC (rev 139186)
@@ -1,3 +1,20 @@
+2013-01-09  Zeno Albisser  <[email protected]>
+
+        [Qt] WebGL content is incomplete when using multiple canvas
+        https://bugs.webkit.org/show_bug.cgi?id=106313
+
+        While we are using double buffering for WebGL,
+        we do not use a drawable that implements a mechanism
+        for swapping buffers.
+        Therefore we have to make sure that all GL commands
+        have been executed properly before copying the texture
+        onto the GraphicsSurface.
+
+        Reviewed by Simon Hausmann.
+
+        * platform/graphics/qt/GraphicsContext3DQt.cpp:
+        (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext):
+
 2013-01-09  Carlos Garcia Campos  <[email protected]>
 
         Unreviewed. Fix make distcheck.

Modified: trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp (139185 => 139186)


--- trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp	2013-01-09 12:07:51 UTC (rev 139185)
+++ trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp	2013-01-09 13:31:47 UTC (rev 139186)
@@ -322,16 +322,20 @@
 
 void GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext() const
 {
-    if (!m_context->m_attrs.antialias)
-        return;
-
     const QOpenGLContext* currentContext = QOpenGLContext::currentContext();
     QSurface* currentSurface = 0;
     if (currentContext && currentContext != m_platformContext) {
         currentSurface = currentContext->surface();
         m_platformContext->makeCurrent(m_surface);
     }
-    blitMultisampleFramebuffer();
+
+    if (m_context->m_attrs.antialias)
+        blitMultisampleFramebuffer();
+
+    // While the context is still bound, make sure all the Framebuffer content is in finished state.
+    // This is necessary as we are doing our own double buffering instead of using a drawable that provides swapBuffers.
+    glFinish();
+
     if (currentContext && currentContext != m_platformContext)
         const_cast<QOpenGLContext*>(currentContext)->makeCurrent(currentSurface);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to