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

Unified Diff: content/renderer/render_widget.cc

Issue 12614013: Plumb cc::LatencyInfo through command buffer and output surface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 61ce902bdf22b20f9ad74c9f20d8d2d91ae94372..c9e397714941305917b2cb811875bc1fdb339b57 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -550,6 +550,7 @@ bool RenderWidget::ForceCompositingModeEnabled() {
}
scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() {
+ CommandBufferProxyImpl* proxy = NULL;
// Explicitly disable antialiasing for the compositor. As of the time of
// this writing, the only platform that supported antialiasing for the
// compositor was Mac OS X, because the on-screen OpenGL context creation
@@ -564,7 +565,7 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() {
attributes.antialias = false;
attributes.shareResources = true;
attributes.noAutomaticFlushes = true;
- WebGraphicsContext3D* context = CreateGraphicsContext3D(attributes);
+ WebGraphicsContext3D* context = CreateGraphicsContext3D(attributes, &proxy);
if (!context)
return scoped_ptr<cc::OutputSurface>();
@@ -574,7 +575,7 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() {
// stopgap adapter class to present the software renderer output using a
// 3d context.
return scoped_ptr<cc::OutputSurface>(
- new CompositorOutputSurface(routing_id(), NULL,
+ new CompositorOutputSurface(routing_id(), NULL, NULL,
new CompositorSoftwareOutputDeviceGLAdapter(context)));
} else {
bool composite_to_mailbox =
@@ -584,8 +585,8 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() {
// 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));
+ new MailboxOutputSurface(routing_id(), context, proxy, NULL) :
+ new CompositorOutputSurface(routing_id(), context, proxy, NULL));
}
}
@@ -2256,7 +2257,8 @@ bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const {
}
WebGraphicsContext3D* RenderWidget::CreateGraphicsContext3D(
- const WebGraphicsContext3D::Attributes& attributes) {
+ const WebGraphicsContext3D::Attributes& attributes,
+ CommandBufferProxyImpl** proxy) {
if (!webwidget_)
return NULL;
// The WebGraphicsContext3DInProcessImpl code path is used for
@@ -2278,6 +2280,7 @@ WebGraphicsContext3D* RenderWidget::CreateGraphicsContext3D(
false /* bind generates resources */,
CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE))
return NULL;
+ *proxy = context->GetCommandBufferProxy();
return context.release();
}
}
« content/renderer/gpu/mailbox_output_surface.cc ('K') | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698