Index: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc |
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc |
index 09f13f0a188d2a79021b289b8683d4c5da6640c4..f12956870908054ed8da52fd9f077b4465ec838c 100644 |
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc |
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc |
@@ -1545,6 +1545,20 @@ void WebGraphicsContext3DCommandBufferImpl::signalSyncPoint( |
base::Bind(&SignalSyncPointCallback, base::Passed(&own_callback))); |
} |
+void WebGraphicsContext3DCommandBufferImpl::signalQuery( |
+ unsigned query, |
+ WebGraphicsSyncPointCallback* callback) { |
+ // Take ownership of the callback. |
+ scoped_ptr<WebGraphicsSyncPointCallback> own_callback(callback); |
+ // Flush any pending commands to make sure that the the query |
+ // has actually been created/started before we try to attach |
+ // a callback to it. |
+ gl_->Flush(); |
+ command_buffer_->SignalQuery( |
+ query, |
+ base::Bind(&SignalSyncPointCallback, base::Passed(&own_callback))); |
+} |
+ |
void WebGraphicsContext3DCommandBufferImpl::genMailboxCHROMIUM( |
WGC3Dbyte* name) { |
std::vector<gpu::Mailbox> names; |