aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-07-18 18:15:13 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-20 19:50:32 +0000
commit45c16fa82cd2fec010d4cb7763b654a413cabd0c (patch)
tree2c6e4376e11dca4b4c3ae479b7835096124016f5 /bench
parent3f4671871fac8e5439440ce756d0666bc2a96f46 (diff)
convert over to 2d-mode
[√] 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 <mtklein@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'bench')
-rw-r--r--bench/SkRasterPipelineBench.cpp21
1 files changed, 11 insertions, 10 deletions
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);
}
}
};