Index: src/android/SkBitmapRegionCodec.cpp |
diff --git a/src/android/SkBitmapRegionCodec.cpp b/src/android/SkBitmapRegionCodec.cpp |
index 9c21484ec55294626913aa34183a3d1fa25ae588..df0a32ca311bdc9a6ceecd8c724de2b6bbf61684 100644 |
--- a/src/android/SkBitmapRegionCodec.cpp |
+++ b/src/android/SkBitmapRegionCodec.cpp |
@@ -135,5 +135,8 @@ bool SkBitmapRegionCodec::decodeRegion(SkBitmap* bitmap, SkBRDAllocator* allocat |
} |
bool SkBitmapRegionCodec::conversionSupported(SkColorType colorType) { |
- return conversion_possible(fCodec->getInfo().makeColorType(colorType), fCodec->getInfo()); |
+ // Enable legacy behavior. |
+ sk_sp<SkColorSpace> colorSpace = nullptr; |
+ SkImageInfo dstInfo = fCodec->getInfo().makeColorType(colorType).makeColorSpace(colorSpace); |
+ return conversion_possible_ignore_color_space(dstInfo, fCodec->getInfo()); |
} |