summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_client.h
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-27 03:31:59 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-27 03:31:59 +0000
commitf10dc47a8ee183986c0cd0f7d3044806e3eb348c (patch)
treeb0b49305aa8ca017dc9f17d5fa7a141ba5526c43 /cc/trees/layer_tree_host_client.h
parent3ef76fac2240990a32288f7e769e9006f319adee (diff)
downloadchromium_src-f10dc47a8ee183986c0cd0f7d3044806e3eb348c.zip
chromium_src-f10dc47a8ee183986c0cd0f7d3044806e3eb348c.tar.gz
chromium_src-f10dc47a8ee183986c0cd0f7d3044806e3eb348c.tar.bz2
Expose only one LayerTreeHostClient::OffscreenContextProvider()
LayerTreeHostClient currently provides two OffscreenContextProvider getters, one for contexts usable on the main thread and one for contexts usable on the compositor thread. However, the compositor only uses one - the main thread context in single threaded mode and the compositor thread context in threaded mode - and the embedder that implements LTHClient picks which mode the compositor runs in. This reduces the API down to one call and updates the comment to better reflect the requirements. Some compositor embedders, like RenderThreadImpl, do need to keep a main thread context around for other reasons. When they are running the compositor in single threaded mode it's useful to use the same context. This moves the logic for doing that sharing out to the embedders. It turns out there are only two so it's all that much code. R=danakj,piman Review URL: https://codereview.chromium.org/23567027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225643 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees/layer_tree_host_client.h')
-rw-r--r--cc/trees/layer_tree_host_client.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/cc/trees/layer_tree_host_client.h b/cc/trees/layer_tree_host_client.h
index 9e11f7c..648ee85 100644
--- a/cc/trees/layer_tree_host_client.h
+++ b/cc/trees/layer_tree_host_client.h
@@ -39,12 +39,10 @@ class LayerTreeHostClient {
// Used only in the single-threaded path.
virtual void ScheduleComposite() = 0;
- // These must always return a valid ContextProvider. But the provider does not
- // need to be capable of creating contexts.
- virtual scoped_refptr<cc::ContextProvider>
- OffscreenContextProviderForMainThread() = 0;
- virtual scoped_refptr<cc::ContextProvider>
- OffscreenContextProviderForCompositorThread() = 0;
+ // If the client provides an OutputSurface bound to a 3d context for direct
+ // rendering, this must return a provider that provides contexts usable from
+ // the same thread as the OutputSurface's context.
+ virtual scoped_refptr<cc::ContextProvider> OffscreenContextProvider() = 0;
// This hook is for testing.
virtual void DidFailToInitializeOutputSurface() {}