aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-08-03 10:22:42 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-03 15:37:37 +0000
commit16776dfb4b307c70d08e316f2ecf2a53953f2e0d (patch)
treeb95896287b957f1286a8f99c872fda9673def4ae /bench
parent073073e4a49993818a7fc4996a7fb42f3ec79640 (diff)
funnel all constant colors through append_constant_color()
My next step is to change the uniform_color context to struct { float r,g,b,a; uint32_t rgba; }; so that it's trivial to load in both float and 8-bit pipelines. Change-Id: If9bdde353ced3bf9eb0c63204b4770ed614ad16b Reviewed-on: https://skia-review.googlesource.com/30481 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'bench')
-rw-r--r--bench/SkRasterPipelineBench.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/bench/SkRasterPipelineBench.cpp b/bench/SkRasterPipelineBench.cpp
index 0df8086401..818ab2b447 100644
--- a/bench/SkRasterPipelineBench.cpp
+++ b/bench/SkRasterPipelineBench.cpp
@@ -123,8 +123,9 @@ public:
SkColorSpaceTransferFn from_2dot2 = gamma( 2.2f),
to_2dot2 = gamma(1/2.2f);
- SkRasterPipeline_<256> p;
- p.append(SkRasterPipeline::uniform_color, &c);
+ SkSTArenaAlloc<256> alloc;
+ SkRasterPipeline p(&alloc);
+ p.append_constant_color(&alloc, c);
p.append(SkRasterPipeline::parametric_r, &from_2dot2);
p.append(SkRasterPipeline::parametric_g, &from_2dot2);
p.append(SkRasterPipeline::parametric_b, &from_2dot2);