From cad37d275799e1d4761c5f192b134249c34a1c77 Mon Sep 17 00:00:00 2001 From: "piman@google.com" Date: Wed, 5 Jan 2011 01:18:59 +0000 Subject: Make Graphics3D::SwapBuffers take a completion callback BUG=none TEST=with demo_simple_vertex_shader, rate control works Review URL: http://codereview.chromium.org/5944001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70474 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc') diff --git a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc index 659c8be..1be5461 100644 --- a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc +++ b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc @@ -116,6 +116,11 @@ bool WebGraphicsContext3DCommandBufferImpl::initialize( renderview->routing_id(), kWebGraphicsContext3DPerferredGLExtensions, attribs); + if (context_) { + ggl::SetSwapBuffersCallback( + context_, + NewCallback(renderview, &RenderView::DidFlushPaint)); + } } else { bool compositing_enabled = !CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableAcceleratedCompositing); -- cgit v1.1