aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts/SkRasterPipeline_opts.h
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2017-02-09 13:50:45 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-09 19:54:11 +0000
commit5101448ebb28cdd8104436ee25ce34c7d5dfe334 (patch)
treeaef66b2fbdc7cd2f0d5416c1c652e59d7b3276f2 /src/opts/SkRasterPipeline_opts.h
parenta04bb45b23e201f317e6bddd41b3241df9f3ac2c (diff)
Pixel conversion refactors: use raster pipeline for 565 and gray
I'm trying not to do too much in one CL. But, in general, I hope to drop (non-performance important/optimized) special cases and use the pipeline. BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I724d3982f1467f6232371360b860484f13b1ede8 Reviewed-on: https://skia-review.googlesource.com/8271 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/opts/SkRasterPipeline_opts.h')
-rw-r--r--src/opts/SkRasterPipeline_opts.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h
index dec81d990a..4f01fd5b70 100644
--- a/src/opts/SkRasterPipeline_opts.h
+++ b/src/opts/SkRasterPipeline_opts.h
@@ -520,6 +520,12 @@ STAGE_CTX(store_a8, uint8_t**) {
store(tail, SkNx_cast<uint8_t>(SkNf_round(255.0f, a)), ptr);
}
+STAGE_CTX(load_g8, const uint8_t**) {
+ auto ptr = *ctx + x;
+ r = g = b = SkNf_from_byte(load(tail, ptr));
+ a = 1.0f;
+}
+
STAGE_CTX(load_565, const uint16_t**) {
auto ptr = *ctx + x;
from_565(load(tail, ptr), &r,&g,&b);