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

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: rebase 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
« no previous file with comments | « content/renderer/gpu/mailbox_output_surface.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index dcd48e6724904e0dfb39c14c93b80b4c39322e0f..410e12dde6c425a2a9dc835767289f405a25a0eb 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"
@@ -2043,8 +2044,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));
+ // 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));
}
}
« no previous file with comments | « content/renderer/gpu/mailbox_output_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698