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

Unified Diff: gpu/command_buffer/client/gles2_implementation_impl_autogen.h

Issue 960873002: Update from https://crrev.com/318214 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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_impl_autogen.h
diff --git a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
index 625c7473af16d2f27a780be27faca48f03fbbd15..641efde39ff27a48e62c58c04100c6552459dcb6 100644
--- a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
@@ -1286,6 +1286,46 @@ void GLES2Implementation::GetShaderSource(GLuint shader,
}
CheckGLError();
}
+void GLES2Implementation::GetSynciv(GLsync sync,
+ GLenum pname,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* values) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_VALIDATE_DESTINATION_OPTIONAL_INITALIZATION(GLsizei, length);
+ GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(GLint, values);
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetSynciv(" << sync << ", "
+ << GLES2Util::GetStringSyncParameter(pname) << ", "
+ << bufsize << ", " << static_cast<const void*>(length)
+ << ", " << static_cast<const void*>(values) << ")");
+ if (bufsize < 0) {
+ SetGLError(GL_INVALID_VALUE, "glGetSynciv", "bufsize < 0");
+ return;
+ }
+ TRACE_EVENT0("gpu", "GLES2Implementation::GetSynciv");
+ if (GetSyncivHelper(sync, pname, bufsize, length, values)) {
+ return;
+ }
+ typedef cmds::GetSynciv::Result Result;
+ Result* result = GetResultAs<Result*>();
+ if (!result) {
+ return;
+ }
+ result->SetNumResults(0);
+ helper_->GetSynciv(ToGLuint(sync), pname, GetResultShmId(),
+ GetResultShmOffset());
+ WaitForCmd();
+ result->CopyResult(values);
+ GPU_CLIENT_LOG_CODE_BLOCK({
+ for (int32_t i = 0; i < result->GetNumResults(); ++i) {
+ GPU_CLIENT_LOG(" " << i << ": " << result->GetData()[i]);
+ }
+ });
+ if (length) {
+ *length = result->GetNumResults();
+ }
+ CheckGLError();
+}
void GLES2Implementation::GetTexParameterfv(GLenum target,
GLenum pname,
GLfloat* params) {

Powered by Google App Engine
This is Rietveld 408576698