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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageBuffer.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/ImageBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
index 4e8a92b4db7f35c194fb626cc306b94c37dfe78a..129d7c5062b2d974c42bbbc6e38796da51a43988 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
@@ -200,16 +200,13 @@ WebLayer* ImageBuffer::platformLayer() const {
bool ImageBuffer::copyToPlatformTexture(SnapshotReason reason,
gpu::gles2::GLES2Interface* gl,
+ GLenum target,
GLuint texture,
- GLenum internalFormat,
- GLenum destType,
- GLint level,
bool premultiplyAlpha,
bool flipY,
const IntPoint& destPoint,
const IntRect& sourceSubRectangle) {
- if (!Extensions3DUtil::canUseCopyTextureCHROMIUM(
- GL_TEXTURE_2D, internalFormat, destType, level))
+ if (!Extensions3DUtil::canUseCopyTextureCHROMIUM(target))
return false;
if (!isSurfaceValid())
@@ -260,7 +257,7 @@ bool ImageBuffer::copyToPlatformTexture(SnapshotReason reason,
// It is expected that callers of this method have already allocated
// the platform texture with the appropriate size.
gl->CopySubTextureCHROMIUM(
- sourceTexture, 0, GL_TEXTURE_2D, texture, 0, destPoint.x(), destPoint.y(),
+ sourceTexture, 0, target, texture, 0, destPoint.x(), destPoint.y(),
sourceSubRectangle.x(), sourceSubRectangle.y(),
sourceSubRectangle.width(), sourceSubRectangle.height(),
flipY ? GL_FALSE : GL_TRUE, GL_FALSE,
@@ -304,7 +301,7 @@ bool ImageBuffer::copyRenderingResultsFromDrawingBuffer(
gl->Flush();
return drawingBuffer->copyToPlatformTexture(
- gl, textureId, GL_RGBA, GL_UNSIGNED_BYTE, 0, true, false, IntPoint(0, 0),
+ gl, GL_TEXTURE_2D, textureId, true, false, IntPoint(0, 0),
IntRect(IntPoint(0, 0), drawingBuffer->size()), sourceBuffer);
}

Powered by Google App Engine
This is Rietveld 408576698