aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/jumper/SkJumper.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-04-07 16:55:09 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-17 14:06:33 +0000
commit7fee90cb5eda2345bb8ec9be706aea1a09866005 (patch)
tree90b83b6ddee7df58914a4fa001300b59b3aae576 /src/jumper/SkJumper.h
parentc589b0b5c0235c3adedc574c8846fb62414ed93c (diff)
add a callback stage to SkRasterPipeline
This lets us temporarily escape to piece of code outside SkRasterPipeline. We should be able to use this to replace - parametric_{r,g,b,a} - table_{r,g,b,a} - color_lookup_table - shader_adapter* * We want to obsolete shader_adapter for other reasons anyway, but we _could_ replace it with this if we want to. Change-Id: I42b657b3c19c679796ed1876856cae0c8471307e Reviewed-on: https://skia-review.googlesource.com/12102 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/jumper/SkJumper.h')
-rw-r--r--src/jumper/SkJumper.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/jumper/SkJumper.h b/src/jumper/SkJumper.h
index 7a3f4e85f5..0567e75eb0 100644
--- a/src/jumper/SkJumper.h
+++ b/src/jumper/SkJumper.h
@@ -12,6 +12,13 @@
// and SkJumper_stages.cpp (compiled into Skia _and_ offline into SkJumper_generated.h).
// Keep it simple!
+// Sometimes we need to make sure externally facing functions are called with MS' ABI, not System V.
+#if defined(JUMPER) && defined(WIN)
+ #define MAYBE_MSABI __attribute__((ms_abi))
+#else
+ #define MAYBE_MSABI
+#endif
+
#if defined(JUMPER) && (defined(__aarch64__) || defined(__arm__))
// To reduce SkJumper's dependency on the Android NDK,
// we provide what we need from <string.h>, <stdint.h>, and <stddef.h> ourselves.
@@ -74,4 +81,9 @@ struct SkJumper_SamplerCtx {
float scaley[SkJumper_kMaxStride];
};
+struct SkJumper_CallbackCtx {
+ MAYBE_MSABI void (*fn)(void* arg, int active_pixels/*<= SkJumper_kMaxStride*/);
+ void* arg;
+};
+
#endif//SkJumper_DEFINED