aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/android
diff options
context:
space:
mode:
Diffstat (limited to 'src/android')
-rw-r--r--src/android/SkBitmapRegionCodec.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/android/SkBitmapRegionCodec.cpp b/src/android/SkBitmapRegionCodec.cpp
index 973e3c9470..ffe7ea81f8 100644
--- a/src/android/SkBitmapRegionCodec.cpp
+++ b/src/android/SkBitmapRegionCodec.cpp
@@ -52,12 +52,9 @@ bool SkBitmapRegionCodec::decodeRegion(SkBitmap* bitmap, SkBRDAllocator* allocat
// Create the image info for the decode
SkColorType dstColorType = fCodec->computeOutputColorType(prefColorType);
SkAlphaType dstAlphaType = fCodec->computeOutputAlphaType(requireUnpremul);
-
- // Enable legacy behavior to avoid any gamma correction. Android's assets are
- // adjusted to expect a non-gamma correct premultiply.
- sk_sp<SkColorSpace> colorSpace = nullptr;
+ sk_sp<SkColorSpace> dstColorSpace = fCodec->computeOutputColorSpace(dstColorType);
SkImageInfo decodeInfo = SkImageInfo::Make(scaledSize.width(), scaledSize.height(),
- dstColorType, dstAlphaType, colorSpace);
+ dstColorType, dstAlphaType, dstColorSpace);
// Construct a color table for the decode if necessary
sk_sp<SkColorTable> colorTable(nullptr);
@@ -135,8 +132,6 @@ bool SkBitmapRegionCodec::decodeRegion(SkBitmap* bitmap, SkBRDAllocator* allocat
}
bool SkBitmapRegionCodec::conversionSupported(SkColorType colorType) {
- // Enable legacy behavior.
- sk_sp<SkColorSpace> colorSpace = nullptr;
- SkImageInfo dstInfo = fCodec->getInfo().makeColorType(colorType).makeColorSpace(colorSpace);
+ SkImageInfo dstInfo = fCodec->getInfo().makeColorType(colorType);
return conversion_possible(dstInfo, fCodec->getInfo());
}