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

Unified Diff: gpu/blink/webgraphicscontext3d_impl.cc

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Folded sync_point into sync_tokens Created 5 years, 2 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: 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) {

Powered by Google App Engine
This is Rietveld 408576698