[chromium] Avoid creating a temporary GraphicsContext3D if someone requests the WebVi...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2012 01:56:03 +0000 (01:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2012 01:56:03 +0000 (01:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=78154

Patch by James Robinson <jamesr@chromium.org> on 2012-02-08
Reviewed by Kenneth Russell.

* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::context):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107161 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp

index 6766bf4..d8bfb02 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-08  James Robinson  <jamesr@chromium.org>
+
+        [chromium] Avoid creating a temporary GraphicsContext3D if someone requests the WebView's GraphicsContext3D before initialization is complete
+        https://bugs.webkit.org/show_bug.cgi?id=78154
+
+        Reviewed by Kenneth Russell.
+
+        * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
+        (WebCore::CCSingleThreadProxy::context):
+
 2012-02-08  David Hyatt  <hyatt@apple.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=78157
index cb696ed..b7fc612 100644 (file)
@@ -95,6 +95,8 @@ bool CCSingleThreadProxy::compositeAndReadback(void *pixels, const IntRect& rect
 GraphicsContext3D* CCSingleThreadProxy::context()
 {
     ASSERT(CCProxy::isMainThread());
+    if (m_contextBeforeInitialization)
+        return m_contextBeforeInitialization.get();
     DebugScopedSetImplThread impl;
     return m_layerTreeHostImpl->context();
 }