I forgot that if a png has the significant bit
chunk set to R=5, G=6, B=5, we will recommend
a decode to 565.
We need to avoid this. The codec does not
support color correct 565.
BUG=skia:
Change-Id: Ieb74bfaf100504d9748e4b8014a8a4e425428c7a
Reviewed-on: https://skia-review.googlesource.com/10166
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
SkBitmap dst;
SkImageInfo dstInfo = fCache.info().makeColorSpace(target);
if (kIndex_8_SkColorType == dstInfo.colorType() ||
- kGray_8_SkColorType == dstInfo.colorType()) {
+ kGray_8_SkColorType == dstInfo.colorType() ||
+ kRGB_565_SkColorType == dstInfo.colorType()) {
dstInfo = dstInfo.makeColorType(kN32_SkColorType);
}
dst.allocPixels(dstInfo);