Index: bench/ColorCodecBench.cpp |
diff --git a/bench/ColorCodecBench.cpp b/bench/ColorCodecBench.cpp |
index 9ae5601d49ef512d8792ce1b25819e0505156c2b..6aa46d609f5877bb5e624ff66c4b45bf395a26c3 100644 |
--- a/bench/ColorCodecBench.cpp |
+++ b/bench/ColorCodecBench.cpp |
@@ -18,6 +18,7 @@ DEFINE_bool(qcms, false, "Bench qcms color conversion"); |
#endif |
DEFINE_bool(xform_only, false, "Only time the color xform, do not include the decode time"); |
DEFINE_bool(srgb, false, "Convert to srgb dst space"); |
+DEFINE_bool(nonstd, false, "Convert to non-standard dst space"); |
DEFINE_bool(half, false, "Convert to half floats"); |
ColorCodecBench::ColorCodecBench(const char* name, sk_sp<SkData> encoded) |
@@ -172,6 +173,13 @@ void ColorCodecBench::onDelayedSetup() { |
fDstSpace = as_CSB(fDstSpace)->makeLinearGamma(); |
} |
+ if (FLAGS_nonstd) { |
+ float gammas[3] = { 1.8f, 2.0f, 2.5f, }; |
+ SkMatrix44 matrix = SkMatrix44(SkMatrix44::kUninitialized_Constructor); |
+ matrix.set3x3(0.30f, 0.31f, 0.28f, 0.32f, 0.33f, 0.29f, 0.27f, 0.30f, 0.30f); |
+ fDstSpace = SkColorSpace::NewRGB(gammas, matrix); |
+ } |
+ |
fDstInfo = fDstInfo.makeColorSpace(fDstSpace); |
fDst.reset(fDstInfo.getSafeSize(fDstInfo.minRowBytes())); |