diff options
author | msarett <msarett@google.com> | 2016-08-15 08:10:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-15 08:10:44 -0700 |
commit | 200877eecaba782e56a1dd9e13a92f36d7b1ba12 (patch) | |
tree | f63a5343e187612b2f7798bfcbe50f07fe51a446 /bench | |
parent | a95d46b4ac8e41c9beb2b750cd389b1c6ebaf0a7 (diff) |
Optimize color xforms when src and dst are matching
Useful when:
(1) Client does not realize src and dst match (calls color
xform anyway).
(2) Client wants half floats, src and dst have matching
gamuts
(3) Client wants premul (done correctly in linear space),
src and dst have matching gamuts.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206403003
Review-Url: https://codereview.chromium.org/2206403003
Diffstat (limited to 'bench')
-rw-r--r-- | bench/ColorCodecBench.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bench/ColorCodecBench.cpp b/bench/ColorCodecBench.cpp index 7ec2c94cbe..0687f9ca7e 100644 --- a/bench/ColorCodecBench.cpp +++ b/bench/ColorCodecBench.cpp @@ -182,14 +182,11 @@ void ColorCodecBench::onDelayedSetup() { void ColorCodecBench::onDraw(int n, SkCanvas*) { #if defined(SK_TEST_QCMS) - bool to8888 = FLAGS_srgb || FLAGS_qcms; -#else - bool to8888 = FLAGS_srgb; -#endif - if (to8888 && FLAGS_half) { + if (FLAGS_qcms && FLAGS_half) { SkDebugf("Error: Contradicting flags.\n"); return; } +#endif for (int i = 0; i < n; i++) { #if defined(SK_TEST_QCMS) |