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

Unified Diff: bench/ColorCodecBench.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 | « no previous file | dm/DMSrcSink.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/ColorCodecBench.cpp
diff --git a/bench/ColorCodecBench.cpp b/bench/ColorCodecBench.cpp
index 0687f9ca7ed93cd3277d7d1a92f9f7a67319b671..9f57ddc623596fa4b7830e881dc9b8d4e5f56900 100644
--- a/bench/ColorCodecBench.cpp
+++ b/bench/ColorCodecBench.cpp
@@ -162,10 +162,13 @@ void ColorCodecBench::onDelayedSetup() {
fSrcInfo = codec->getInfo().makeColorType(kRGBA_8888_SkColorType);
- fDstInfo = fSrcInfo.makeColorSpace(fDstSpace);
if (FLAGS_half) {
fDstInfo = fDstInfo.makeColorType(kRGBA_F16_SkColorType);
+ fDstSpace = fDstSpace->makeLinearGamma();
}
+
+ fDstInfo = fSrcInfo.makeColorSpace(fDstSpace);
+
fDst.reset(fDstInfo.getSafeSize(fDstInfo.minRowBytes()));
if (FLAGS_xform_only) {
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698