| Index: Source/platform/graphics/ImageBuffer.cpp
|
| diff --git a/Source/platform/graphics/ImageBuffer.cpp b/Source/platform/graphics/ImageBuffer.cpp
|
| index 55c1b939b09bcde9a0e5ca85741b29f009c6b58a..c4439d2c953019e049a3bf2b34743a6e6c7f5068 100644
|
| --- a/Source/platform/graphics/ImageBuffer.cpp
|
| +++ b/Source/platform/graphics/ImageBuffer.cpp
|
| @@ -170,8 +170,7 @@ bool ImageBuffer::copyToPlatformTexture(blink::WebGraphicsContext3D* context, Pl
|
|
|
| // Contexts may be in a different share group. We must transfer the texture through a mailbox first
|
| sharedContext->genMailboxCHROMIUM(mailbox->name);
|
| - sharedContext->bindTexture(GL_TEXTURE_2D, getBackingTexture());
|
| - sharedContext->produceTextureCHROMIUM(GL_TEXTURE_2D, mailbox->name);
|
| + sharedContext->produceTextureDirectCHROMIUM(getBackingTexture(), GL_TEXTURE_2D, mailbox->name);
|
| sharedContext->flush();
|
|
|
| mailbox->syncPoint = sharedContext->insertSyncPoint();
|
| @@ -179,12 +178,8 @@ bool ImageBuffer::copyToPlatformTexture(blink::WebGraphicsContext3D* context, Pl
|
| if (!context->makeContextCurrent())
|
| return false;
|
|
|
| - Platform3DObject sourceTexture = context->createTexture();
|
| -
|
| - context->bindTexture(GL_TEXTURE_2D, sourceTexture);
|
| -
|
| context->waitSyncPoint(mailbox->syncPoint);
|
| - context->consumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox->name);
|
| + Platform3DObject sourceTexture = context->createAndConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox->name);
|
|
|
| // The canvas is stored in a premultiplied format, so unpremultiply if necessary.
|
| context->pixelStorei(GC3D_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, !premultiplyAlpha);
|
| @@ -196,7 +191,6 @@ bool ImageBuffer::copyToPlatformTexture(blink::WebGraphicsContext3D* context, Pl
|
| context->pixelStorei(GC3D_UNPACK_FLIP_Y_CHROMIUM, false);
|
| context->pixelStorei(GC3D_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, false);
|
|
|
| - context->bindTexture(GL_TEXTURE_2D, 0);
|
| context->deleteTexture(sourceTexture);
|
|
|
| context->flush();
|
|
|