Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index 9597b4b4be03110049cc2ccdf174544cfdef69c4..63571b262bb8c0e993470707210ced6029bf942f 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -83,6 +83,7 @@ |
#include "content/renderer/gpu/compositor_output_surface.h" |
#include "content/renderer/gpu/compositor_software_output_device_gl_adapter.h" |
#include "content/renderer/gpu/compositor_thread.h" |
+#include "content/renderer/gpu/mailbox_output_surface.h" |
#include "content/renderer/gpu/render_widget_compositor.h" |
#include "content/renderer/idle_user_detector.h" |
#include "content/renderer/input_tag_speech_dispatcher.h" |
@@ -2041,8 +2042,15 @@ scoped_ptr<cc::OutputSurface> RenderViewImpl::CreateOutputSurface() { |
new CompositorOutputSurface(routing_id(), NULL, |
new CompositorSoftwareOutputDeviceGLAdapter(context))); |
} else { |
- return scoped_ptr<cc::OutputSurface>( |
- new CompositorOutputSurface(routing_id(), context, NULL)); |
+ bool composite_to_mailbox = |
+ command_line.HasSwitch(cc::switches::kCompositeToMailbox); |
+ DCHECK(!composite_to_mailbox || command_line.HasSwitch( |
+ cc::switches::kEnableCompositorFrameMessage)); |
piman
2013/02/27 23:51:04
Could we instead make sure settings.compositorFram
no sievers
2013/02/28 18:43:40
I'd rather remove kEnableCompositorFrameMessage so
piman
2013/02/28 19:30:31
As long as we come back and clean this soon, ok.
|
+ // 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)); |
} |
} |