Index: gpu/blink/webgraphicscontext3d_impl.cc |
diff --git a/gpu/blink/webgraphicscontext3d_impl.cc b/gpu/blink/webgraphicscontext3d_impl.cc |
index ae7b1604fbd34815d2e39cb110947b690cbd5efc..040d7e1c068f51443d86d0a5fc79f86589a935ab 100644 |
--- a/gpu/blink/webgraphicscontext3d_impl.cc |
+++ b/gpu/blink/webgraphicscontext3d_impl.cc |
@@ -11,6 +11,7 @@ |
#include "gpu/command_buffer/client/gles2_implementation.h" |
#include "gpu/command_buffer/client/gles2_lib.h" |
#include "gpu/command_buffer/common/gles2_cmd_utils.h" |
+#include "gpu/command_buffer/common/sync_token.h" |
#include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" |
#include "third_party/khronos/GLES2/gl2.h" |
@@ -213,7 +214,15 @@ uint32_t WebGraphicsContext3DImpl::lastFlushID() { |
return flush_id_; |
} |
-DELEGATE_TO_GL_R(insertSyncPoint, InsertSyncPointCHROMIUM, unsigned int) |
+bool WebGraphicsContext3DImpl::insertSyncPoint(WGC3Dbyte* sync_token) { |
+ const uint32_t sync_point = gl_->InsertSyncPointCHROMIUM(); |
+ if (!sync_point) |
+ return false; |
+ |
+ gpu::SyncToken sync_token_data(sync_point); |
+ memcpy(sync_token, &sync_token_data, sizeof(sync_token_data)); |
+ return true; |
+} |
DELEGATE_TO_GL_3(reshapeWithScaleFactor, ResizeCHROMIUM, int, int, float) |
@@ -880,7 +889,7 @@ void WebGraphicsContext3DImpl::shallowFinishCHROMIUM() { |
gl_->ShallowFinishCHROMIUM(); |
} |
-DELEGATE_TO_GL_1(waitSyncPoint, WaitSyncPointCHROMIUM, GLuint) |
+DELEGATE_TO_GL_1(waitSyncToken, WaitSyncTokenCHROMIUM, const WGC3Dbyte*) |
void WebGraphicsContext3DImpl::loseContextCHROMIUM( |
WGC3Denum current, WGC3Denum other) { |