aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/jumper/SkJumper_stages.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-04-17 14:43:59 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-17 19:59:11 +0000
commitc7d9c0b80886d24e74cd6e5a7118f44c06e0cd9b (patch)
tree5b95bee61e28c7ba5f0f1e31a90bd4f1eb96ffd4 /src/jumper/SkJumper_stages.cpp
parent6a2ccb2b34f5f3ba34efed2855dca4a46e82b630 (diff)
jumper, table_{r,g,b,a}
In testing, it didn't really seem like we're getting anything out of doing an interpolated lookup, so this just does a single rounded lookup. Change-Id: If85ba68675945b442076519dd7f1bf7540d1628d Reviewed-on: https://skia-review.googlesource.com/13646 Commit-Queue: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/jumper/SkJumper_stages.cpp')
-rw-r--r--src/jumper/SkJumper_stages.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jumper/SkJumper_stages.cpp b/src/jumper/SkJumper_stages.cpp
index 590426b571..b366cf5b12 100644
--- a/src/jumper/SkJumper_stages.cpp
+++ b/src/jumper/SkJumper_stages.cpp
@@ -663,6 +663,14 @@ STAGE(byte_tables_rgb) {
b = from_byte(gather(tables->b, round(b, scale)));
}
+SI F table(F v, const SkJumper_TableCtx* ctx) {
+ return gather(ctx->table, round(v, ctx->size - 1));
+}
+STAGE(table_r) { r = table(r, ctx); }
+STAGE(table_g) { g = table(g, ctx); }
+STAGE(table_b) { b = table(b, ctx); }
+STAGE(table_a) { a = table(a, ctx); }
+
STAGE(load_a8) {
auto ptr = *(const uint8_t**)ctx + x;