Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2084)

Unified Diff: content/renderer/render_view_impl.cc

Issue 12371002: [cc] Mailbox Output Surface Support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));
}
}

Powered by Google App Engine
This is Rietveld 408576698