aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/android
diff options
context:
space:
mode:
authorGravatar Leon Scroggins III <scroggo@google.com>2018-03-13 11:14:33 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-13 15:42:52 +0000
commit0118e9756d92d3c56b9e05842d7c828f37f68159 (patch)
treeabba2299d13bf90f0898df166bbf5afa605edea7 /src/android
parent15a68c4365be9f76041e5f12ad7d984b341f7c93 (diff)
Remove calls to computeOutputColor- Type and Space
Bug: b/70846442 Test: I5110881203c000474116a94a48f2afc9a9b62001 These methods were already called by the client. The client may have further overridden the SkColorType (and therefore the SkColorSpace), so respect their final decision on both. Change-Id: Iddcf618e474784b0a000fd516250c44285dacc6b Reviewed-on: https://skia-review.googlesource.com/114062 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/SkBitmapRegionCodec.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/android/SkBitmapRegionCodec.cpp b/src/android/SkBitmapRegionCodec.cpp
index 493e4b5672..6b17a9015d 100644
--- a/src/android/SkBitmapRegionCodec.cpp
+++ b/src/android/SkBitmapRegionCodec.cpp
@@ -17,8 +17,8 @@ SkBitmapRegionCodec::SkBitmapRegionCodec(SkAndroidCodec* codec)
{}
bool SkBitmapRegionCodec::decodeRegion(SkBitmap* bitmap, SkBRDAllocator* allocator,
- const SkIRect& desiredSubset, int sampleSize, SkColorType prefColorType,
- bool requireUnpremul, sk_sp<SkColorSpace> prefColorSpace) {
+ const SkIRect& desiredSubset, int sampleSize, SkColorType dstColorType,
+ bool requireUnpremul, sk_sp<SkColorSpace> dstColorSpace) {
// Fix the input sampleSize if necessary.
if (sampleSize < 1) {
@@ -50,10 +50,7 @@ bool SkBitmapRegionCodec::decodeRegion(SkBitmap* bitmap, SkBRDAllocator* allocat
SkISize scaledSize = fCodec->getSampledSubsetDimensions(sampleSize, subset);
// Create the image info for the decode
- SkColorType dstColorType = fCodec->computeOutputColorType(prefColorType);
SkAlphaType dstAlphaType = fCodec->computeOutputAlphaType(requireUnpremul);
- sk_sp<SkColorSpace> dstColorSpace = fCodec->computeOutputColorSpace(dstColorType,
- prefColorSpace);
SkImageInfo decodeInfo = SkImageInfo::Make(scaledSize.width(), scaledSize.height(),
dstColorType, dstAlphaType, dstColorSpace);