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

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

Issue 2016043002: Avoid copy pixel data in texImage2D(ImageBitmap) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change to OwnPtr Created 4 years, 7 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/WebGLImageConversion.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
index e9eee504a9d39d6a1066424f069df9247bd2fbd3..a12ac2445e45a64296c6706fd4001087968f5185 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
@@ -2313,6 +2313,7 @@ bool WebGLImageConversion::packImageData(
bool WebGLImageConversion::extractImageData(
const uint8_t* imageData,
+ DataFormat sourceDataFormat,
const IntSize& imageDataSize,
GLenum format,
GLenum type,
@@ -2333,7 +2334,7 @@ bool WebGLImageConversion::extractImageData(
return false;
data.resize(packedSize);
- if (!packPixels(imageData, DataFormatRGBA8, width, height, 0, format, type, premultiplyAlpha ? AlphaDoPremultiply : AlphaDoNothing, data.data(), flipY))
+ if (!packPixels(imageData, sourceDataFormat, width, height, 0, format, type, premultiplyAlpha ? AlphaDoPremultiply : AlphaDoNothing, data.data(), flipY))
return false;
return true;

Powered by Google App Engine
This is Rietveld 408576698