aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/jumper/SkJumper.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-09-22 15:32:59 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-22 22:06:08 +0000
commitf3b4e16c36a6c789fc129aa3bd15c34b44ee8743 (patch)
tree441fddf9ad89c5d606b40ac2597bfc5844fea7ec /src/jumper/SkJumper.h
parent6f67cf7c4e14a65a54ee1fc67e81e5aa3d1e3d0e (diff)
Fold clamp_{x,y} into the gathers.
All three image tile modes go through exclusive_clamp() and then a gather today, so we can move the work of exclusive_clamp() into eac gather_ stage, eliminating the need for clamp_{x,y} stages. Luckily, we've got a convenient place to bottleneck this, ptr_and_ix(), which works out the pointer and vector of indices to load for gathers. This deletes SkRasterPipeline_repeat_tiling unit test, which now no longer exactly makes sense. It tests that repeat_x does that clamp, but that's now done automatically outside that stage. Change-Id: I24637ef60921bec7aa00082984c0c6a49dd86ca9 Reviewed-on: https://skia-review.googlesource.com/50260 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src/jumper/SkJumper.h')
-rw-r--r--src/jumper/SkJumper.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/jumper/SkJumper.h b/src/jumper/SkJumper.h
index 9d7b7ab1d9..9de28f3dbc 100644
--- a/src/jumper/SkJumper.h
+++ b/src/jumper/SkJumper.h
@@ -62,6 +62,13 @@ struct SkJumper_MemoryCtx {
int stride;
};
+struct SkJumper_GatherCtx {
+ void* pixels;
+ int stride;
+ float width,
+ height;
+};
+
// State shared by save_xy, accumulate, and bilinear_* / bicubic_*.
struct SkJumper_SamplerCtx {
float x[SkJumper_kMaxStride];