aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts/SkRasterPipeline_opts.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opts/SkRasterPipeline_opts.h')
-rw-r--r--src/opts/SkRasterPipeline_opts.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h
index a40fe6c72e..163b9ebbf0 100644
--- a/src/opts/SkRasterPipeline_opts.h
+++ b/src/opts/SkRasterPipeline_opts.h
@@ -897,6 +897,29 @@ namespace SK_OPTS_NS {
default: break;
}
}
+ if (nstages == 3 && stages[0].stage == SkRasterPipeline::constant_color
+ && stages[1].stage == SkRasterPipeline::to_srgb
+ && stages[2].stage == SkRasterPipeline::store_8888) {
+ auto src = (const SkPM4f*)stages[0].ctx;
+ auto dst = (uint32_t**)stages[2].ctx;
+ return Memset32{dst, Sk4f_toS32(src->to4f())};
+ }
+ if (nstages == 4 && stages[0].stage == SkRasterPipeline::constant_color
+ && stages[1].stage == SkRasterPipeline::to_srgb
+ && stages[2].stage == SkRasterPipeline::swap_rb
+ && stages[3].stage == SkRasterPipeline::store_8888) {
+ auto src = (const SkPM4f*)stages[0].ctx;
+ auto dst = (uint32_t**)stages[3].ctx;
+ return Memset32{dst, Sk4f_toS32(swizzle_rb(src->to4f())) };
+ }
+ if (nstages == 4 && stages[0].stage == SkRasterPipeline::constant_color
+ && stages[1].stage == SkRasterPipeline::swap_rb
+ && stages[2].stage == SkRasterPipeline::to_srgb
+ && stages[3].stage == SkRasterPipeline::store_8888) {
+ auto src = (const SkPM4f*)stages[0].ctx;
+ auto dst = (uint32_t**)stages[3].ctx;
+ return Memset32{dst, Sk4f_toS32(swizzle_rb(src->to4f())) };
+ }
struct Compiled {
Compiled(const SkRasterPipeline::Stage* stages, int nstages) {