Use a colorspace when decoding to F16
A recent change caused us to always pass a color space to the decoder. A revert of that change caused us to never pass a color space to the decoder. In order to decode to F16 (and pass CTS tests), we need to pass a color space on decodes to F16. This was the "original" behavior before the bad change and bad revert. Test: This will allow us to pass CTS. BUG:33814604 Change-Id: I4e569213f9d4ff5a452149c4b2ee191bf2fe6b0e
This commit is contained in:
@@ -395,12 +395,9 @@ static jobject doDecode(JNIEnv* env, SkStreamRewindable* stream, jobject padding
|
||||
SkAlphaType alphaType = codec->computeOutputAlphaType(requireUnpremultiplied);
|
||||
|
||||
const SkImageInfo decodeInfo = SkImageInfo::Make(size.width(), size.height(),
|
||||
decodeColorType, alphaType);
|
||||
decodeColorType, alphaType, GraphicsJNI::colorSpaceForType(decodeColorType));
|
||||
|
||||
// We always decode to sRGB, but only mark the bitmap with a color space if linear
|
||||
// blending is enabled.
|
||||
SkImageInfo bitmapInfo = decodeInfo.makeColorSpace(
|
||||
GraphicsJNI::colorSpaceForType(decodeColorType));
|
||||
SkImageInfo bitmapInfo = decodeInfo;
|
||||
if (decodeColorType == kGray_8_SkColorType) {
|
||||
// The legacy implementation of BitmapFactory used kAlpha8 for
|
||||
// grayscale images (before kGray8 existed). While the codec
|
||||
|
||||
Reference in New Issue
Block a user