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

Unified Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 14126014: Add signalSyncPoint to the WebGraphicsContext3D command buffer impls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removedusing Created 7 years, 8 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/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 0f2fcb129737dcd41a1469805c3ce752b11e7b4b..09eb95b1f65e63bae29dfbb0c5a50843eb3848f1 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -1625,6 +1625,22 @@ DELEGATE_TO_GL(shallowFlushCHROMIUM,ShallowFlushCHROMIUM);
DELEGATE_TO_GL_1(waitSyncPoint, WaitSyncPointCHROMIUM, GLuint)
+static void SignalSyncPointCallback(
+ scoped_ptr<
+ WebKit::WebGraphicsContext3D::WebGraphicsSyncPointCallback> callback) {
+ callback->onSyncPointReached();
+}
+
+void WebGraphicsContext3DCommandBufferImpl::signalSyncPoint(
+ unsigned sync_point,
+ WebGraphicsSyncPointCallback* callback) {
+ // Take ownership of the callback.
+ scoped_ptr<WebGraphicsSyncPointCallback> own_callback(callback);
+ command_buffer_->SignalSyncPoint(
+ sync_point,
+ base::Bind(&SignalSyncPointCallback, base::Passed(&own_callback)));
+}
+
void WebGraphicsContext3DCommandBufferImpl::genMailboxCHROMIUM(
WGC3Dbyte* name) {
std::vector<gpu::Mailbox> names(1);

Powered by Google App Engine
This is Rietveld 408576698