Chromium Code Reviews| Index: content/renderer/render_widget.cc |
| diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc |
| index 3ca21050881e6ea4effedfb30399fef5acafc461..9d538303c38b33251922a77dd2fb199f2b6e3703 100644 |
| --- a/content/renderer/render_widget.cc |
| +++ b/content/renderer/render_widget.cc |
| @@ -26,6 +26,7 @@ |
| #include "content/public/common/content_switches.h" |
| #include "content/renderer/gpu/compositor_output_surface.h" |
| #include "content/renderer/gpu/compositor_software_output_device.h" |
| +#include "content/renderer/gpu/delegated_compositor_output_surface.h" |
| #include "content/renderer/gpu/input_handler_manager.h" |
| #include "content/renderer/gpu/mailbox_output_surface.h" |
| #include "content/renderer/gpu/render_widget_compositor.h" |
| @@ -600,7 +601,7 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() { |
| if (command_line.HasSwitch(switches::kEnableSoftwareCompositingGLAdapter)) { |
| return scoped_ptr<cc::OutputSurface>( |
| new CompositorOutputSurface(routing_id(), NULL, |
| - new CompositorSoftwareOutputDevice())); |
| + new CompositorSoftwareOutputDevice(), true)); |
| } |
| // Explicitly disable antialiasing for the compositor. As of the time of |
| @@ -626,14 +627,18 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() { |
| if (!context) |
| return scoped_ptr<cc::OutputSurface>(); |
| - bool composite_to_mailbox = |
| - command_line.HasSwitch(cc::switches::kCompositeToMailbox) && |
| - !command_line.HasSwitch(switches::kEnableDelegatedRenderer); |
| - // No swap throttling yet when compositing on the main thread. |
| - DCHECK(!composite_to_mailbox || is_threaded_compositing_enabled_); |
| - return scoped_ptr<cc::OutputSurface>(composite_to_mailbox ? |
| - new MailboxOutputSurface(routing_id(), context, NULL) : |
| - new CompositorOutputSurface(routing_id(), context, NULL)); |
| + if (command_line.HasSwitch(switches::kEnableDelegatedRenderer)) { |
| + DCHECK(is_threaded_compositing_enabled_); |
| + return scoped_ptr<cc::OutputSurface>( |
| + new DelegatedCompositorOutputSurface(routing_id(), context, NULL)); |
| +} |
|
joth
2013/06/10 18:43:32
nit: indent
aelias_OOO_until_Jul13
2013/06/10 18:57:57
Done.
|
| + if (command_line.HasSwitch(cc::switches::kCompositeToMailbox)) { |
| + DCHECK(is_threaded_compositing_enabled_); |
| + return scoped_ptr<cc::OutputSurface>( |
| + new MailboxOutputSurface(routing_id(), context, NULL)); |
| + } |
| + return scoped_ptr<cc::OutputSurface>( |
| + new CompositorOutputSurface(routing_id(), context, NULL, false)); |
| } |
| void RenderWidget::OnViewContextSwapBuffersAborted() { |