Title: [134945] trunk/Source/WebCore
Revision
134945
Author
zeno.albis...@digia.com
Date
2012-11-16 06:55:36 -0800 (Fri, 16 Nov 2012)

Log Message

[Qt] Adding a null pointer check for currentContext to GraphicsContext3DQt.
https://bugs.webkit.org/show_bug.cgi?id=102360

QOpenGLContext::currentContext() will return null, in case there is
no current context. Therefore currentContext must be null-checked
before it can be reused.
Making a context current on a null-surface on the other hand is
perfectly possible.

Reviewed by Kenneth Rohde Christiansen.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (134944 => 134945)


--- trunk/Source/WebCore/ChangeLog	2012-11-16 14:38:16 UTC (rev 134944)
+++ trunk/Source/WebCore/ChangeLog	2012-11-16 14:55:36 UTC (rev 134945)
@@ -1,3 +1,19 @@
+2012-11-16  Zeno Albisser  <z...@webkit.org>
+
+        [Qt] Adding a null pointer check for currentContext to GraphicsContext3DQt.
+        https://bugs.webkit.org/show_bug.cgi?id=102360
+
+        QOpenGLContext::currentContext() will return null, in case there is
+        no current context. Therefore currentContext must be null-checked
+        before it can be reused.
+        Making a context current on a null-surface on the other hand is
+        perfectly possible.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * platform/graphics/qt/GraphicsContext3DQt.cpp:
+        (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext):
+
 2012-11-16  Eugene Klyuchnikov  <eustas....@gmail.com>
 
         Web Inspector: Workaround to show shortcuts for panels that hasn't been loaded.

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


--- trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp	2012-11-16 14:38:16 UTC (rev 134944)
+++ trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp	2012-11-16 14:55:36 UTC (rev 134945)
@@ -319,12 +319,12 @@
 
     const QOpenGLContext* currentContext = QOpenGLContext::currentContext();
     QSurface* currentSurface = 0;
-    if (currentContext != m_platformContext) {
+    if (currentContext && currentContext != m_platformContext) {
         currentSurface = currentContext->surface();
         m_platformContext->makeCurrent(m_surface);
     }
     blitMultisampleFramebuffer();
-    if (currentSurface)
+    if (currentContext)
         const_cast<QOpenGLContext*>(currentContext)->makeCurrent(currentSurface);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to