From 45c16fa82cd2fec010d4cb7763b654a413cabd0c Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Tue, 18 Jul 2017 18:15:13 -0400 Subject: convert over to 2d-mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [√] convert all stages to use SkJumper_MemoryCtx / be 2d-compatible [√] convert compile to 2d also, remove 1d run/compile [√] convert all call sites [√] no diffs Change-Id: I3b806eb8fe0c3ec043359616409f7cd1211a1e43 Reviewed-on: https://skia-review.googlesource.com/24263 Commit-Queue: Mike Klein Reviewed-by: Florin Malita --- bench/SkRasterPipelineBench.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'bench/SkRasterPipelineBench.cpp') diff --git a/bench/SkRasterPipelineBench.cpp b/bench/SkRasterPipelineBench.cpp index 33e0efd997..0df8086401 100644 --- a/bench/SkRasterPipelineBench.cpp +++ b/bench/SkRasterPipelineBench.cpp @@ -8,6 +8,7 @@ #include "Benchmark.h" #include "SkOpts.h" #include "SkRasterPipeline.h" +#include "../src/jumper/SkJumper.h" static const int N = 15; @@ -35,9 +36,9 @@ public: } void onDraw(int loops, SkCanvas*) override { - void* mask_ctx = mask; - void* src_ctx = src; - void* dst_ctx = dst; + SkJumper_MemoryCtx mask_ctx = {mask, 0}, + src_ctx = {src, 0}, + dst_ctx = {dst, 0}; SkRasterPipeline_<256> p; p.append(SkRasterPipeline::load_8888, &src_ctx); @@ -59,7 +60,7 @@ public: } while (loops --> 0) { - p.run(0,0,N); + p.run(0,0,N,1); } } }; @@ -76,8 +77,8 @@ public: } void onDraw(int loops, SkCanvas*) override { - void* src_ctx = src; - void* dst_ctx = dst; + SkJumper_MemoryCtx src_ctx = {src, 0}, + dst_ctx = {dst, 0}; SkRasterPipeline_<256> p; p.append(SkRasterPipeline::load_8888, &dst_ctx); @@ -89,11 +90,11 @@ public: if (fCompile) { auto fn = p.compile(); while (loops --> 0) { - fn(0,0,N); + fn(0,0,N,1); } } else { while (loops --> 0) { - p.run(0,0,N); + p.run(0,0,N,1); } } } @@ -132,7 +133,7 @@ public: p.append(SkRasterPipeline::parametric_b, & to_2dot2); while (loops --> 0) { - p.run(0,0,N); + p.run(0,0,N,1); } } }; @@ -150,7 +151,7 @@ public: p.append(SkRasterPipeline::to_srgb); while (loops --> 0) { - p.run(0,0,N); + p.run(0,0,N,1); } } }; -- cgit v1.2.3