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>
diff --git a/bench/SkRasterPipelineBench.cpp b/bench/SkRasterPipelineBench.cpp
index 33e0efd..0df8086 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 @@
}
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 @@
}
while (loops --> 0) {
- p.run(0,0,N);
+ p.run(0,0,N,1);
}
}
};
@@ -76,8 +77,8 @@
}
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 @@
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 @@
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 @@
p.append(SkRasterPipeline::to_srgb);
while (loops --> 0) {
- p.run(0,0,N);
+ p.run(0,0,N,1);
}
}
};