summaryrefslogtreecommitdiffstats
path: root/cc/single_thread_proxy.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-22 20:32:05 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-22 20:32:05 +0000
commit0a4517266a77d10a276d6c674efafc79e4c7f7a5 (patch)
tree88b095919aa268128698e980d9b780b09f839aad /cc/single_thread_proxy.h
parent3395887c69c58e75b084ef919dc88fd037bb9bc0 (diff)
downloadchromium_src-0a4517266a77d10a276d6c674efafc79e4c7f7a5.zip
chromium_src-0a4517266a77d10a276d6c674efafc79e4c7f7a5.tar.gz
chromium_src-0a4517266a77d10a276d6c674efafc79e4c7f7a5.tar.bz2
cc: Route offscreen context creation for compositor to the browser.
Currently the compositor asks WebKit for the SharedGraphicsContext. For the browser compositor, we instead route requests for an offscreen context to ui/compositor, where we are able to create the context. This patch only addresses offscreen contexts for the browser compositor. The renderer compositor still gets its contexts from WebKit, but now via the LayerTreeHostClient interface instead of directly going to the WebSharedGraphicsContext3D. Tested by the lost context unit tests. They now test that on context loss, the shared context is also recreated, and that if it fails to be recreated that we retry context creation. BUG=169373,175383 Review URL: https://chromiumcodereview.appspot.com/12212007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/single_thread_proxy.h')
-rw-r--r--cc/single_thread_proxy.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/cc/single_thread_proxy.h b/cc/single_thread_proxy.h
index a499501..a8be093 100644
--- a/cc/single_thread_proxy.h
+++ b/cc/single_thread_proxy.h
@@ -14,6 +14,7 @@
namespace cc {
+class ContextProvider;
class LayerTreeHost;
class SingleThreadProxy : public Proxy, LayerTreeHostImplClient {
@@ -73,12 +74,13 @@ private:
bool commitAndComposite();
void doCommit(scoped_ptr<ResourceUpdateQueue>);
- bool doComposite();
+ bool doComposite(scoped_refptr<cc::ContextProvider> offscreenContextProvider);
void didSwapFrame();
// Accessed on main thread only.
LayerTreeHost* m_layerTreeHost;
bool m_outputSurfaceLost;
+ bool m_createdOffscreenContextProvider;
// Holds on to the context between initializeContext() and initializeRenderer() calls. Shouldn't
// be used for anything else.