| 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) {
|
|
|