From d738dcf0f073aef85efebd9087e69473f9989016 Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Thu, 9 Feb 2012 01:56:03 +0000 Subject: [PATCH] [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 Patch by James Robinson 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 | 10 ++++++++++ .../platform/graphics/chromium/cc/CCSingleThreadProxy.cpp | 2 ++ 2 files changed, 12 insertions(+) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 6766bf4..d8bfb02 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,13 @@ +2012-02-08 James Robinson + + [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 https://bugs.webkit.org/show_bug.cgi?id=78157 diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp index cb696ed..b7fc612 100644 --- a/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp +++ b/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp @@ -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(); } -- 2.7.4