| 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 b99b332f74f559e299b6bd9c5cff26f12417fc26..9275a49089735406fa57da9dbfdab8459c2dd834 100644
|
| --- a/gpu/command_buffer/client/gles2_implementation.cc
|
| +++ b/gpu/command_buffer/client/gles2_implementation.cc
|
| @@ -3472,12 +3472,34 @@ void GLES2Implementation::GenMailboxCHROMIUM(
|
| << static_cast<const void*>(mailbox) << ")");
|
| TRACE_EVENT0("gpu", "GLES2::GenMailboxCHROMIUM");
|
|
|
| - std::vector<gpu::Mailbox> names;
|
| - if (!gpu_control_->GenerateMailboxNames(1, &names)) {
|
| - SetGLError(GL_OUT_OF_MEMORY, "glGenMailboxCHROMIUM", "Generate failed.");
|
| - return;
|
| - }
|
| - memcpy(mailbox, names[0].name, GL_MAILBOX_SIZE_CHROMIUM);
|
| + gpu::Mailbox result = gpu::Mailbox::Generate();
|
| + memcpy(mailbox, result.name, sizeof(result.name));
|
| +}
|
| +
|
| +void GLES2Implementation::ProduceTextureCHROMIUM(GLenum target,
|
| + const GLbyte* data) {
|
| + GPU_CLIENT_SINGLE_THREAD_CHECK();
|
| + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glProduceTextureCHROMIUM("
|
| + << static_cast<const void*>(data) << ")");
|
| + const Mailbox& mailbox = *reinterpret_cast<const Mailbox*>(data);
|
| + DCHECK(mailbox.Verify()) << "ProduceTextureCHROMIUM was passed a "
|
| + "mailbox that was not generated by "
|
| + "GenMailboxCHROMIUM.";
|
| + helper_->ProduceTextureCHROMIUMImmediate(target, data);
|
| + CheckGLError();
|
| +}
|
| +
|
| +void GLES2Implementation::ConsumeTextureCHROMIUM(GLenum target,
|
| + const GLbyte* data) {
|
| + GPU_CLIENT_SINGLE_THREAD_CHECK();
|
| + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glConsumeTextureCHROMIUM("
|
| + << static_cast<const void*>(data) << ")");
|
| + const Mailbox& mailbox = *reinterpret_cast<const Mailbox*>(data);
|
| + DCHECK(mailbox.Verify()) << "ConsumeTextureCHROMIUM was passed a "
|
| + "mailbox that was not generated by "
|
| + "GenMailboxCHROMIUM.";
|
| + helper_->ConsumeTextureCHROMIUMImmediate(target, data);
|
| + CheckGLError();
|
| }
|
|
|
| void GLES2Implementation::PushGroupMarkerEXT(
|
|
|