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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h

Issue 2787053004: Respect colorSpace in DecodingImageGenerator::onGetPixels() (Closed)
Patch Set: Response to comments Created 3 years, 8 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/ImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
index 4cf7f23eaeb0cae45c9583eb7863b5741b8e0a9b..82d81b0e755f24daa532bad1ebb63c1248ea292d 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
@@ -226,6 +226,10 @@ class PLATFORM_EXPORT ImageDecoder {
// Transformation from embedded color space to target color space.
SkColorSpaceXform* colorTransform();
+ AlphaOption alphaOption() const {
+ return m_premultiplyAlpha ? AlphaPremultiplied : AlphaNotPremultiplied;
scroggo_chromium 2017/04/07 18:06:06 I wonder if we should store an AlphaOption instead
msarett1 2017/04/10 14:42:46 I think it makes more sense to store the AlphaOpti
scroggo_chromium 2017/04/10 17:31:23 sgtm
+ }
+
// Sets the "decode failure" flag. For caller convenience (since so
// many callers want to return false after calling this), returns false
// to enable easy tailcalling. Subclasses may override this to also

Powered by Google App Engine
This is Rietveld 408576698