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

Unified Diff: src/codec/SkCodecPriv.h

Issue 1820413002: Workaround to set the sRGB flag on SkImageGenerator (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix jpeg Created 4 years, 9 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 | « src/codec/SkCodecImageGenerator.cpp ('k') | src/codec/SkJpegCodec.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 2b22922b0c9b158c148b3c0271a0913ccaa2f3bc..8dde60fcd3c7be4fc0a501078185a4277c3bc063 100644
--- a/src/codec/SkCodecPriv.h
+++ b/src/codec/SkCodecPriv.h
@@ -117,13 +117,9 @@ inline bool valid_alpha(SkAlphaType dstAlpha, SkAlphaType srcAlpha) {
*/
inline bool conversion_possible(const SkImageInfo& dst, const SkImageInfo& src) {
// 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;
- }
+ // Currently, we ignore the SkColorProfileType on the SkImageInfo. We
+ // will treat the encoded data as linear regardless of what the client
+ // requests.
// Ensure the alpha type is valid
if (!valid_alpha(dst.alphaType(), src.alphaType())) {
« no previous file with comments | « src/codec/SkCodecImageGenerator.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698