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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp

Issue 1972683002: Early reporting of opaqueness by decoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/image-decoders/jpeg/JPEGImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
index a89c388b078d78d3507ebafda4a17ee1aa95f2d6..4e7f1002f9cbeb07d64e9cc82ae72395af599d61 100644
--- a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
@@ -753,6 +753,13 @@ size_t JPEGImageDecoder::decodedYUVWidthBytes(int component) const
return computeYUVWidthBytes(info, component);
}
+bool JPEGImageDecoder::frameHasAlphaAtIndex(size_t index) const
+{
+ if (index == 0 && isAllDataReceived())
scroggo_chromium 2016/05/16 20:38:20 I don't think this is quite correct. It's possible
+ return false;
+ return ImageDecoder::frameHasAlphaAtIndex(index);
+}
+
unsigned JPEGImageDecoder::desiredScaleNumerator() const
{
size_t originalBytes = size().width() * size().height() * 4;

Powered by Google App Engine
This is Rietveld 408576698