diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-25 22:37:09 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-25 22:37:09 +0000 |
commit | 65a33ce4b6feb129f23aac8661d4d9725d2c802e (patch) | |
tree | 3ced0816cc1459d4213fce662dfdff1fe63e36c4 | |
parent | 9d85eea41488b044b467c7857f10e29bba9e3624 (diff) | |
download | chromium_src-65a33ce4b6feb129f23aac8661d4d9725d2c802e.zip chromium_src-65a33ce4b6feb129f23aac8661d4d9725d2c802e.tar.gz chromium_src-65a33ce4b6feb129f23aac8661d4d9725d2c802e.tar.bz2 |
Enable delegated rendering with software compositor.
When the --enable-delegated-renderer command-line flag is set, the delegated renderer should be used for both software and hardware.
BUG=327220
Review URL: https://codereview.chromium.org/202023005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259368 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/renderer/gpu/delegated_compositor_output_surface.cc | 5 | ||||
-rw-r--r-- | content/renderer/gpu/delegated_compositor_output_surface.h | 3 | ||||
-rw-r--r-- | content/renderer/render_widget.cc | 19 |
3 files changed, 12 insertions, 15 deletions
diff --git a/content/renderer/gpu/delegated_compositor_output_surface.cc b/content/renderer/gpu/delegated_compositor_output_surface.cc index 02ad158..263d5f4 100644 --- a/content/renderer/gpu/delegated_compositor_output_surface.cc +++ b/content/renderer/gpu/delegated_compositor_output_surface.cc @@ -9,12 +9,11 @@ namespace content { DelegatedCompositorOutputSurface::DelegatedCompositorOutputSurface( int32 routing_id, uint32 output_surface_id, - const scoped_refptr<ContextProviderCommandBuffer>& context_provider, - scoped_ptr<cc::SoftwareOutputDevice> software) + const scoped_refptr<ContextProviderCommandBuffer>& context_provider) : CompositorOutputSurface(routing_id, output_surface_id, context_provider, - software.Pass(), + scoped_ptr<cc::SoftwareOutputDevice>(), true) { capabilities_.delegated_rendering = true; capabilities_.max_frames_pending = 1; diff --git a/content/renderer/gpu/delegated_compositor_output_surface.h b/content/renderer/gpu/delegated_compositor_output_surface.h index 1e02c3d..f971f1c 100644 --- a/content/renderer/gpu/delegated_compositor_output_surface.h +++ b/content/renderer/gpu/delegated_compositor_output_surface.h @@ -14,8 +14,7 @@ class DelegatedCompositorOutputSurface : public CompositorOutputSurface { DelegatedCompositorOutputSurface( int32 routing_id, uint32 output_surface_id, - const scoped_refptr<ContextProviderCommandBuffer>& context_provider, - scoped_ptr<cc::SoftwareOutputDevice> software); + const scoped_refptr<ContextProviderCommandBuffer>& context_provider); virtual ~DelegatedCompositorOutputSurface() {} }; diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 2234369..28e7e97 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -906,6 +906,15 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) { } uint32 output_surface_id = next_output_surface_id_++; + if (command_line.HasSwitch(switches::kEnableDelegatedRenderer) && + !command_line.HasSwitch(switches::kDisableDelegatedRenderer)) { + DCHECK(is_threaded_compositing_enabled_); + return scoped_ptr<cc::OutputSurface>( + new DelegatedCompositorOutputSurface( + routing_id(), + output_surface_id, + context_provider)); + } if (!context_provider.get()) { if (!command_line.HasSwitch(switches::kEnableSoftwareCompositing)) return scoped_ptr<cc::OutputSurface>(); @@ -921,16 +930,6 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) { true)); } - if (command_line.HasSwitch(switches::kEnableDelegatedRenderer) && - !command_line.HasSwitch(switches::kDisableDelegatedRenderer)) { - DCHECK(is_threaded_compositing_enabled_); - return scoped_ptr<cc::OutputSurface>( - new DelegatedCompositorOutputSurface( - routing_id(), - output_surface_id, - context_provider, - scoped_ptr<cc::SoftwareOutputDevice>())); - } if (command_line.HasSwitch(cc::switches::kCompositeToMailbox)) { DCHECK(is_threaded_compositing_enabled_); cc::ResourceFormat format = cc::RGBA_8888; |