Title: [107127] trunk/Source/WebCore
Revision
107127
Author
jam...@google.com
Date
2012-02-08 13:32:54 -0800 (Wed, 08 Feb 2012)

Log Message

[chromium] Check that we can make the SharedGraphicsContext3D current before returning
https://bugs.webkit.org/show_bug.cgi?id=78142

Reviewed by Stephen White.

If we can't make the context current, we can't use it.

* platform/graphics/gpu/SharedGraphicsContext3D.cpp:
(WebCore::SharedGraphicsContext3D::get):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107126 => 107127)


--- trunk/Source/WebCore/ChangeLog	2012-02-08 21:22:49 UTC (rev 107126)
+++ trunk/Source/WebCore/ChangeLog	2012-02-08 21:32:54 UTC (rev 107127)
@@ -1,3 +1,15 @@
+2012-02-08  James Robinson  <jam...@chromium.org>
+
+        [chromium] Check that we can make the SharedGraphicsContext3D current before returning
+        https://bugs.webkit.org/show_bug.cgi?id=78142
+
+        Reviewed by Stephen White.
+
+        If we can't make the context current, we can't use it.
+
+        * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
+        (WebCore::SharedGraphicsContext3D::get):
+
 2012-02-08  Abhishek Arya  <infe...@chromium.org>
 
         Crash in Node::normalize.

Modified: trunk/Source/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp (107126 => 107127)


--- trunk/Source/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp	2012-02-08 21:22:49 UTC (rev 107126)
+++ trunk/Source/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp	2012-02-08 21:32:54 UTC (rev 107127)
@@ -39,6 +39,8 @@
     attributes.canRecoverFromContextLoss = false; // Canvas contexts can not handle lost contexts.
     attributes.shareResources = true;
     static GraphicsContext3D* context = GraphicsContext3D::create(attributes, 0).leakRef();
+    if (context && !context->makeContextCurrent())
+        context = 0;
     return context;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to