diff options
author | msarett <msarett@google.com> | 2016-03-23 06:50:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-23 06:50:59 -0700 |
commit | 3ec5db42cc145fb11e352eca6474f91d7a4957e3 (patch) | |
tree | 34cdbc141fee49af0ed9a3a7add4837ac7306200 /src/codec/SkCodecPriv.h | |
parent | b4a7dc99b1a01cdd5c0cd5913b630436ca696210 (diff) |
Workaround to set the sRGB flag on SkImageGenerator
BUG=skia:4895
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820413002
Review URL: https://codereview.chromium.org/1820413002
Diffstat (limited to 'src/codec/SkCodecPriv.h')
-rw-r--r-- | src/codec/SkCodecPriv.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/codec/SkCodecPriv.h b/src/codec/SkCodecPriv.h index 2b22922b0c..8dde60fcd3 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())) { |