aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/jumper/SkJumper.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-04-12 12:52:48 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-12 18:57:09 +0000
commit0a9044950c1caa1b9dc0c2837889850d044d1d34 (patch)
tree42dcf8677e42006eb560b03b7ed5d0bcdd61f092 /src/jumper/SkJumper.h
parent50130e427c4d02405a38e26c4f020159e6ac295a (diff)
jumper, bilinear and bicubic sampling stages
This splits SkImageShaderContext into three parts: - SkJumper_GatherCtx: always, already done - SkJumper_SamplerCtx: when bilinear or bicubic - MiscCtx: other little bits (the matrix, paint color, tiling limits) Thanks for the snazzy allocator that allows this Herb! Both SkJumper and SkRasterPipeline_opts.h should be speaking all the same types now. I've copied the comments about bilinear/bicubic to SkJumper with little typo fixes and clarifications. Change-Id: I4ba7b7c02feba3f65f5292169a22c060e34933c6 Reviewed-on: https://skia-review.googlesource.com/13269 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/jumper/SkJumper.h')
-rw-r--r--src/jumper/SkJumper.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/jumper/SkJumper.h b/src/jumper/SkJumper.h
index b440391f38..7a3f4e85f5 100644
--- a/src/jumper/SkJumper.h
+++ b/src/jumper/SkJumper.h
@@ -52,8 +52,10 @@
// - the _i and _f user-defined literal operators call C() for you in a prettier way; or
// - you can load values from this struct.
+static const int SkJumper_kMaxStride = 8;
+
struct SkJumper_constants {
- float iota[8]; // 0,1,2,3,4,5,6,7
+ float iota[SkJumper_kMaxStride]; // 0,1,2,3,4,...
};
struct SkJumper_GatherCtx {
@@ -62,4 +64,14 @@ struct SkJumper_GatherCtx {
int stride;
};
+// State shared by save_xy, accumulate, and bilinear_* / bicubic_*.
+struct SkJumper_SamplerCtx {
+ float x[SkJumper_kMaxStride];
+ float y[SkJumper_kMaxStride];
+ float fx[SkJumper_kMaxStride];
+ float fy[SkJumper_kMaxStride];
+ float scalex[SkJumper_kMaxStride];
+ float scaley[SkJumper_kMaxStride];
+};
+
#endif//SkJumper_DEFINED