diff options
author | 2017-01-23 18:54:45 -0500 | |
---|---|---|
committer | 2017-01-24 14:17:48 +0000 | |
commit | eb5061baac840e5aa9849985394654b70430fd41 (patch) | |
tree | 9d720c09a22983409b0b8379e32ea00783fce2fb /src | |
parent | bc7a4fb06780f9829b4b21470fe6f0503d2297cd (diff) |
Reenable index8 dsts
This is causing problems with image-cacherator-from-ctable gm.
In that gm, we use an index8->index8 readPixels() to take
a subset.
I think we need to keep this as long as we support index8 in the
generator/cacherator. Though it's really strange because
we don't really bother to verify that color tables are the same
and we don't try to overwrite the dst color table...
BUG=skia:
Change-Id: Icf008caa571c4b81a52a23b8b7d9226789626ef5
Reviewed-on: https://skia-review.googlesource.com/7424
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkImageInfoPriv.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkImageInfoPriv.h b/src/core/SkImageInfoPriv.h index f04acc5484..a79f2cb963 100644 --- a/src/core/SkImageInfoPriv.h +++ b/src/core/SkImageInfoPriv.h @@ -39,7 +39,7 @@ static inline bool SkImageInfoIsValid(const SkImageInfo& info) { /** * Returns true if Skia has defined a pixel conversion from the |src| to the |dst|. * Returns false otherwise. Some discussion of false cases: - * We will not convert to kIndex8. Do we overwrite the input color table? + * We will not convert to kIndex8 when the |src| is not kIndex8. * We do not convert to kGray8 when the |src| is not kGray8. We may add this * feature - it just requires some work to convert to luminance while handling color * spaces correctly. Currently no one is asking for this. @@ -56,7 +56,7 @@ static inline bool SkImageInfoValidConversion(const SkImageInfo& dst, const SkIm return false; } - if (kIndex_8_SkColorType == dst.colorType()) { + if (kIndex_8_SkColorType == dst.colorType() && kIndex_8_SkColorType != src.colorType()) { return false; } |