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

Unified Diff: Source/platform/graphics/gpu/DrawingBuffer.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 | « Source/platform/graphics/ImageBuffer.cpp ('k') | public/platform/WebGraphicsContext3D.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/gpu/DrawingBuffer.cpp
diff --git a/Source/platform/graphics/gpu/DrawingBuffer.cpp b/Source/platform/graphics/gpu/DrawingBuffer.cpp
index 9518743130513b988089fc949a74ad621053483f..0ec4bf9179012c1217b92aa3362f4f7d02e1e9df 100644
--- a/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -455,8 +455,7 @@ bool DrawingBuffer::copyToPlatformTexture(blink::WebGraphicsContext3D* context,
// Contexts may be in a different share group. We must transfer the texture through a mailbox first
RefPtr<MailboxInfo> bufferMailbox = adoptRef(new MailboxInfo());
m_context->genMailboxCHROMIUM(bufferMailbox->mailbox.name);
- m_context->bindTexture(GL_TEXTURE_2D, textureId);
- m_context->produceTextureCHROMIUM(GL_TEXTURE_2D, bufferMailbox->mailbox.name);
+ m_context->produceTextureDirectCHROMIUM(textureId, GL_TEXTURE_2D, bufferMailbox->mailbox.name);
m_context->flush();
bufferMailbox->mailbox.syncPoint = m_context->insertSyncPoint();
@@ -464,16 +463,8 @@ bool DrawingBuffer::copyToPlatformTexture(blink::WebGraphicsContext3D* context,
if (!context->makeContextCurrent())
return false;
- Platform3DObject sourceTexture = context->createTexture();
-
- // TODO(bajones): Should be able to change the texture bindings here without reverting but
- // something else in the system is depending on it. Failing to revert causes WebGL
- // tests to fail. We should find out why and fix it.
- GLint boundTexture = 0;
- context->getIntegerv(GL_TEXTURE_BINDING_2D, &boundTexture);
- context->bindTexture(GL_TEXTURE_2D, sourceTexture);
context->waitSyncPoint(bufferMailbox->mailbox.syncPoint);
- context->consumeTextureCHROMIUM(GL_TEXTURE_2D, bufferMailbox->mailbox.name);
+ Platform3DObject sourceTexture = context->createAndConsumeTextureCHROMIUM(GL_TEXTURE_2D, bufferMailbox->mailbox.name);
bool unpackPremultiplyAlphaNeeded = false;
bool unpackUnpremultiplyAlphaNeeded = false;
@@ -490,7 +481,6 @@ bool DrawingBuffer::copyToPlatformTexture(blink::WebGraphicsContext3D* context,
context->pixelStorei(GC3D_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, false);
context->pixelStorei(GC3D_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, false);
- context->bindTexture(GL_TEXTURE_2D, boundTexture);
context->deleteTexture(sourceTexture);
context->flush();
« no previous file with comments | « Source/platform/graphics/ImageBuffer.cpp ('k') | public/platform/WebGraphicsContext3D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698