summaryrefslogtreecommitdiffstats
path: root/content/renderer/render_thread_impl.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 /content/renderer/render_thread_impl.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 'content/renderer/render_thread_impl.h')
-rw-r--r--content/renderer/render_thread_impl.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index ad4f888..59b7c1d 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -268,10 +268,8 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
scoped_refptr<RendererGpuVideoAcceleratorFactories> GetGpuFactories(
const scoped_refptr<base::MessageLoopProxy>& factories_loop);
- scoped_refptr<cc::ContextProvider>
- OffscreenContextProviderForMainThread();
- scoped_refptr<cc::ContextProvider>
- OffscreenContextProviderForCompositorThread();
+ scoped_refptr<cc::ContextProvider> OffscreenCompositorContextProvider();
+ scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider();
// AudioRendererMixerManager instance which manages renderer side mixer
// instances shared based on configured audio parameters. Lazily created on
@@ -470,9 +468,8 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
scoped_ptr<InputHandlerManager> input_handler_manager_;
scoped_refptr<IPC::ForwardingMessageFilter> compositor_output_surface_filter_;
- scoped_refptr<ContextProviderCommandBuffer> shared_contexts_main_thread_;
- scoped_refptr<ContextProviderCommandBuffer>
- shared_contexts_compositor_thread_;
+ scoped_refptr<ContextProviderCommandBuffer> offscreen_compositor_contexts_;
+ scoped_refptr<ContextProviderCommandBuffer> shared_main_thread_contexts_;
ObserverList<RenderProcessObserver> observers_;