Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1742)

Unified Diff: Source/platform/graphics/ImageBuffer.cpp

Issue 310623004: Making use of bindless variants mailbox produce/consume. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/platform/graphics/gpu/DrawingBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | Source/platform/graphics/gpu/DrawingBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698