Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: dm/DMSrcSink.cpp

Issue 2319293003: Checking for valid colorType, alphaType, colorSpace in SkCodec (Closed)
Patch Set: Fix nanobench Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/ColorCodecBench.cpp ('k') | src/android/SkBitmapRegionCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index caf6f52fe24899bd45c24f2ae966306a13fa8027..fcc4a33a1aa22249080bb65ed3bd58978a2e44f6 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -896,6 +896,9 @@ Error ColorCodecSrc::draw(SkCanvas* canvas) const {
if (kUnpremul_SkAlphaType == decodeInfo.alphaType()) {
decodeInfo = decodeInfo.makeAlphaType(kPremul_SkAlphaType);
}
+ if (kRGBA_F16_SkColorType == fColorType) {
+ decodeInfo = decodeInfo.makeColorSpace(decodeInfo.colorSpace()->makeLinearGamma());
+ }
SkImageInfo bitmapInfo = decodeInfo;
if (kRGBA_8888_SkColorType == decodeInfo.colorType() ||
« no previous file with comments | « bench/ColorCodecBench.cpp ('k') | src/android/SkBitmapRegionCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698