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

Unified Diff: src/codec/SkCodecPriv.h

Issue 1667823004: Set sRGB flag for PNGs with an sRGB chunk (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix Created 4 years, 10 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
« no previous file with comments | « no previous file | src/codec/SkPngCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodecPriv.h
diff --git a/src/codec/SkCodecPriv.h b/src/codec/SkCodecPriv.h
index fa7d146d1afd01ba7c2e3ba3886b48b6367fe999..235c4e24aff3bcbc56787487824170c33f6fd4fa 100644
--- a/src/codec/SkCodecPriv.h
+++ b/src/codec/SkCodecPriv.h
@@ -117,7 +117,12 @@ inline bool valid_alpha(SkAlphaType dstAlpha, SkAlphaType srcAlpha) {
* - otherwise match the src color type
*/
inline bool conversion_possible(const SkImageInfo& dst, const SkImageInfo& src) {
- if (dst.profileType() != src.profileType()) {
+ // FIXME: skbug.com/4895
+ // Currently, we treat both kLinear and ksRGB encoded images as if they are kLinear.
+ // This makes sense while we do not have proper support for ksRGB. This is also
+ // the reason why we always allow the client to request kLinear.
+ if (dst.profileType() != src.profileType() &&
+ kLinear_SkColorProfileType != dst.profileType()) {
return false;
}
« no previous file with comments | « no previous file | src/codec/SkPngCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698