diff options
Diffstat (limited to 'gpu/command_buffer/client/gles2_implementation.cc')
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.cc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index 8f2d3f0..d6b6c97 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -3600,6 +3600,19 @@ void GLES2Implementation::ProduceTextureCHROMIUM(GLenum target, CheckGLError(); } +void GLES2Implementation::ProduceTextureDirectCHROMIUM( + GLuint texture, GLenum target, const GLbyte* data) { + GPU_CLIENT_SINGLE_THREAD_CHECK(); + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glProduceTextureDirectCHROMIUM(" + << static_cast<const void*>(data) << ")"); + const Mailbox& mailbox = *reinterpret_cast<const Mailbox*>(data); + DCHECK(mailbox.Verify()) << "ProduceTextureDirectCHROMIUM was passed a " + "mailbox that was not generated by " + "GenMailboxCHROMIUM."; + helper_->ProduceTextureDirectCHROMIUMImmediate(texture, target, data); + CheckGLError(); +} + void GLES2Implementation::ConsumeTextureCHROMIUM(GLenum target, const GLbyte* data) { GPU_CLIENT_SINGLE_THREAD_CHECK(); @@ -3613,6 +3626,25 @@ void GLES2Implementation::ConsumeTextureCHROMIUM(GLenum target, CheckGLError(); } +GLuint GLES2Implementation::CreateAndConsumeTextureCHROMIUM( + GLenum target, const GLbyte* data) { + GPU_CLIENT_SINGLE_THREAD_CHECK(); + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCreateAndConsumeTextureCHROMIUM(" + << static_cast<const void*>(data) << ")"); + const Mailbox& mailbox = *reinterpret_cast<const Mailbox*>(data); + DCHECK(mailbox.Verify()) << "CreateAndConsumeTextureCHROMIUM was passed a " + "mailbox that was not generated by " + "GenMailboxCHROMIUM."; + GLuint client_id; + GetIdHandler(id_namespaces::kTextures)->MakeIds(this, 0, 1, &client_id); + helper_->CreateAndConsumeTextureCHROMIUMImmediate(target, + client_id, data); + if (share_group_->bind_generates_resource()) + helper_->CommandBufferHelper::Flush(); + CheckGLError(); + return client_id; +} + void GLES2Implementation::PushGroupMarkerEXT( GLsizei length, const GLchar* marker) { GPU_CLIENT_SINGLE_THREAD_CHECK(); |