aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2017-02-01 15:34:22 -0800
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-02 05:23:40 +0000
commit09a1c088b407b2cb04b7f41d71b227e7da4757a8 (patch)
tree842ef5091bf54075470a6c9d97e539b0ee82fae3 /dm
parent0bd699e497819344083df4715928a54a597cd630 (diff)
Prepare to test all image decode modes to F16
I've only been running F16 tests in "colorImage" mode. We really should be running our "image" tests to F16 as well - so they can be tested with scaling, subsets, etc. This CL fixes bugs so that we can enable those tests. BUG=skia: Change-Id: I8137eb4fce7ea12f2c9d233a029d946d4a63e6b0 Reviewed-on: https://skia-review.googlesource.com/7801 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'dm')
-rw-r--r--dm/DMSrcSink.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index cea87f7056..ae34f9038a 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -364,6 +364,13 @@ static bool get_decode_info(SkImageInfo* decodeInfo, SkColorType canvasColorType
kOpaque_SkAlphaType != decodeInfo->alphaType()) {
return false;
}
+
+ if (kRGBA_F16_SkColorType == canvasColorType) {
+ sk_sp<SkColorSpace> linearSpace =
+ as_CSB(decodeInfo->colorSpace())->makeLinearGamma();
+ *decodeInfo = decodeInfo->makeColorSpace(std::move(linearSpace));
+ }
+
*decodeInfo = decodeInfo->makeColorType(canvasColorType);
break;
}