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

Unified Diff: Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 1207483004: Pass flipY and premultiplyAlpha params to command buffer through func args. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 1bbb20f2f48e21180c2a388fe0454f698b65b334..aeed48971a721cb61b1fa6fdfbe5473e0f1aa389 100644
--- a/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -298,7 +298,7 @@ bool DrawingBuffer::prepareMailbox(WebExternalTextureMailbox* outMailbox, WebExt
m_context->discardFramebufferEXT(GL_FRAMEBUFFER, 3, attachments);
}
} else {
- m_context->copyTextureCHROMIUM(GL_TEXTURE_2D, m_colorBuffer.textureId, frontColorBufferMailbox->textureInfo.textureId, GL_RGBA, GL_UNSIGNED_BYTE);
+ m_context->copyTextureCHROMIUM(GL_TEXTURE_2D, m_colorBuffer.textureId, frontColorBufferMailbox->textureInfo.textureId, GL_RGBA, GL_UNSIGNED_BYTE, GL_FALSE, GL_FALSE, GL_FALSE);
}
restoreFramebufferBinding();
@@ -502,20 +502,20 @@ bool DrawingBuffer::copyToPlatformTexture(WebGraphicsContext3D* context, Platfor
context->waitSyncPoint(mailbox.syncPoint);
Platform3DObject sourceTexture = context->createAndConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
- bool unpackPremultiplyAlphaNeeded = false;
- bool unpackUnpremultiplyAlphaNeeded = false;
+ GLboolean unpackPremultiplyAlphaNeeded = GL_FALSE;
+ GLboolean unpackUnpremultiplyAlphaNeeded = GL_FALSE;
if (m_actualAttributes.alpha && m_actualAttributes.premultipliedAlpha && !premultiplyAlpha)
- unpackUnpremultiplyAlphaNeeded = true;
+ unpackUnpremultiplyAlphaNeeded = GL_TRUE;
else if (m_actualAttributes.alpha && !m_actualAttributes.premultipliedAlpha && premultiplyAlpha)
- unpackPremultiplyAlphaNeeded = true;
+ unpackPremultiplyAlphaNeeded = GL_TRUE;
context->pixelStorei(GC3D_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, unpackUnpremultiplyAlphaNeeded);
context->pixelStorei(GC3D_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, unpackPremultiplyAlphaNeeded);
context->pixelStorei(GC3D_UNPACK_FLIP_Y_CHROMIUM, flipY);
- context->copyTextureCHROMIUM(GL_TEXTURE_2D, sourceTexture, texture, internalFormat, destType);
- context->pixelStorei(GC3D_UNPACK_FLIP_Y_CHROMIUM, false);
- context->pixelStorei(GC3D_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, false);
- context->pixelStorei(GC3D_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, false);
+ context->copyTextureCHROMIUM(GL_TEXTURE_2D, sourceTexture, texture, internalFormat, destType, flipY, unpackPremultiplyAlphaNeeded, unpackUnpremultiplyAlphaNeeded);
+ context->pixelStorei(GC3D_UNPACK_FLIP_Y_CHROMIUM, GL_FALSE);
+ context->pixelStorei(GC3D_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, GL_FALSE);
+ context->pixelStorei(GC3D_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, GL_FALSE);
context->deleteTexture(sourceTexture);
« 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