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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 362863002: Add future sync point methods to ContextSupport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 716fb55fbc2eaac205d249c20f9bbd4a2e761b1a..903c4850973f183ac5ac39636c4a97cc507a15d1 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -2202,6 +2202,8 @@ const GLubyte* GLES2Implementation::GetStringHelper(GLenum name) {
// The first space character is intentional.
str += " GL_CHROMIUM_map_image";
}
+ if (capabilities_.future_sync_points)
+ str += " GL_CHROMIUM_future_sync_point";
break;
default:
break;
@@ -3991,6 +3993,23 @@ GLuint GLES2Implementation::InsertSyncPointCHROMIUM() {
return gpu_control_->InsertSyncPoint();
}
+GLuint GLES2Implementation::InsertFutureSyncPointCHROMIUM() {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glInsertFutureSyncPointCHROMIUM");
+ DCHECK(capabilities_.future_sync_points);
+ helper_->CommandBufferHelper::Flush();
+ return gpu_control_->InsertFutureSyncPoint();
+}
+
+void GLES2Implementation::RetireSyncPointCHROMIUM(GLuint sync_point) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glRetireSyncPointCHROMIUM("
+ << sync_point << ")");
+ DCHECK(capabilities_.future_sync_points);
+ helper_->CommandBufferHelper::Flush();
+ gpu_control_->RetireSyncPoint(sync_point);
+}
+
GLuint GLES2Implementation::CreateImageCHROMIUMHelper(GLsizei width,
GLsizei height,
GLenum internalformat,
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698