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

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

Issue 2776083002: enable fallback path (Closed)
Patch Set: use stream read Created 3 years, 9 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
Index: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
index b967171ef7eaaa503f805f4cca17ac8717e9f088..de3b4be763c3943d67ddde160b8cbe371378a484 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -683,10 +683,8 @@ bool DrawingBuffer::initialize(const IntSize& size, bool useMultisampling) {
}
bool DrawingBuffer::copyToPlatformTexture(gpu::gles2::GLES2Interface* gl,
+ GLenum textureTarget,
GLuint texture,
- GLenum internalFormat,
- GLenum destType,
- GLint level,
bool premultiplyAlpha,
bool flipY,
const IntPoint& destTextureOffset,
@@ -700,9 +698,7 @@ bool DrawingBuffer::copyToPlatformTexture(gpu::gles2::GLES2Interface* gl,
m_gl->Flush();
}
- // Assume that the destination target is GL_TEXTURE_2D.
- if (!Extensions3DUtil::canUseCopyTextureCHROMIUM(
- GL_TEXTURE_2D, internalFormat, destType, level))
+ if (!Extensions3DUtil::canUseCopyTextureCHROMIUM(textureTarget))
return false;
// Contexts may be in a different share group. We must transfer the texture
@@ -741,7 +737,7 @@ bool DrawingBuffer::copyToPlatformTexture(gpu::gles2::GLES2Interface* gl,
unpackPremultiplyAlphaNeeded = GL_TRUE;
gl->CopySubTextureCHROMIUM(
- sourceTexture, 0, GL_TEXTURE_2D, texture, 0, destTextureOffset.x(),
+ sourceTexture, 0, textureTarget, texture, 0, destTextureOffset.x(),
destTextureOffset.y(), sourceSubRectangle.x(), sourceSubRectangle.y(),
sourceSubRectangle.width(), sourceSubRectangle.height(), flipY,
unpackPremultiplyAlphaNeeded, unpackUnpremultiplyAlphaNeeded);

Powered by Google App Engine
This is Rietveld 408576698