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; |
} |