Chromium Code Reviews| 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 25cd1cc979944e7c2b7569cf81b3aa2d695084a5..65e38b1c8e6e73c67ca0c5f2052668731f39eee8 100644 |
| --- a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h |
| +++ b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h |
| @@ -546,6 +546,14 @@ void GLES2Implementation::DeleteSamplers(GLsizei n, const GLuint* samplers) { |
| CheckGLError(); |
| } |
| +void GLES2Implementation::DeleteSync(GLsync sync) { |
| + GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteSync(" << sync << ")"); |
| + GPU_CLIENT_DCHECK(sync != 0); |
| + DeleteSyncHelper(sync); |
| + CheckGLError(); |
| +} |
| + |
| void GLES2Implementation::DeleteShader(GLuint shader) { |
| GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteShader(" << shader << ")"); |
| @@ -631,6 +639,27 @@ void GLES2Implementation::DetachShader(GLuint program, GLuint shader) { |
| CheckGLError(); |
| } |
| +GLsync GLES2Implementation::FenceSync(GLenum condition, GLbitfield flags) { |
| + GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glFenceSync(" |
| + << GLES2Util::GetStringSyncCondition(condition) << ", " |
| + << flags << ")"); |
| + if (condition != 0x9117) { |
|
piman
2015/01/22 00:49:32
nit: any way to have the enum rather than the valu
Zhenyao Mo
2015/01/22 01:12:57
Yes, we could switch to use the enum if we forward
|
| + SetGLError(GL_INVALID_ENUM, "glFenceSync", "condition GL_INVALID_ENUM"); |
| + return 0; |
| + } |
| + if (flags != 0) { |
| + SetGLError(GL_INVALID_VALUE, "glFenceSync", "flags GL_INVALID_VALUE"); |
| + return 0; |
| + } |
| + GLuint client_id; |
| + GetIdHandler(id_namespaces::kSyncs)->MakeIds(this, 0, 1, &client_id); |
| + helper_->FenceSync(client_id); |
| + GPU_CLIENT_LOG("returned " << client_id); |
| + CheckGLError(); |
| + return reinterpret_cast<GLsync>(client_id); |
| +} |
| + |
| void GLES2Implementation::FramebufferRenderbuffer(GLenum target, |
| GLenum attachment, |
| GLenum renderbuffertarget, |
| @@ -1463,6 +1492,24 @@ GLboolean GLES2Implementation::IsShader(GLuint shader) { |
| return result_value; |
| } |
| +GLboolean GLES2Implementation::IsSync(GLsync sync) { |
| + GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| + TRACE_EVENT0("gpu", "GLES2Implementation::IsSync"); |
| + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glIsSync(" << sync << ")"); |
| + typedef cmds::IsSync::Result Result; |
| + Result* result = GetResultAs<Result*>(); |
| + if (!result) { |
| + return GL_FALSE; |
| + } |
| + *result = 0; |
| + helper_->IsSync(ToGLuint(sync), GetResultShmId(), GetResultShmOffset()); |
| + WaitForCmd(); |
| + GLboolean result_value = *result != 0; |
| + GPU_CLIENT_LOG("returned " << result_value); |
| + CheckGLError(); |
| + return result_value; |
| +} |
| + |
| GLboolean GLES2Implementation::IsTexture(GLuint texture) { |
| GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| TRACE_EVENT0("gpu", "GLES2Implementation::IsTexture"); |