From 5101448ebb28cdd8104436ee25ce34c7d5dfe334 Mon Sep 17 00:00:00 2001 From: Matt Sarett Date: Thu, 9 Feb 2017 13:50:45 -0500 Subject: 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 Commit-Queue: Matt Sarett --- src/opts/SkRasterPipeline_opts.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/opts') 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(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); -- cgit v1.2.3