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

Unified Diff: gpu/command_buffer/client/gles2_implementation.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: Fix mock gpu video accelerator factory 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/command_buffer/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index f0e4e9b38cca34390d136389773384d5b2a81a1a..0378bee61ec9bf4b60ea3b63b4ab8bcb685cd148 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -5386,6 +5386,20 @@ uint64_t GLES2Implementation::ShareGroupTracingGUID() const {
return share_group_->TracingGUID();
}
+void GLES2Implementation::WaitSyncPointCHROMIUM(GLuint sync_point,
+ const GLbyte* sync_token) {
+ // Copy the data over before data access to ensure alignment.
+ SyncToken sync_token_data;
+ if (sync_token)
+ memcpy(&sync_token_data, sync_token, sizeof(SyncToken));
+
+ if (sync_token_data.HasData()) {
+ WaitSyncTokenCHROMIUM(sync_token);
+ } else {
+ helper_->WaitSyncPointCHROMIUM(sync_point);
+ }
+}
+
GLuint64 GLES2Implementation::InsertFenceSyncCHROMIUM() {
const uint64_t release = gpu_control_->GenerateFenceSyncRelease();
helper_->InsertFenceSyncCHROMIUM(release);

Powered by Google App Engine
This is Rietveld 408576698