diff options
author | 2016-10-12 11:05:05 -0400 | |
---|---|---|
committer | 2016-10-12 17:24:17 +0000 | |
commit | 96b333a9a1b6a367d6c542118638e3108d8ed23b (patch) | |
tree | ca3b80a0f659bc018094362e7d4221eb1992dafb /src/core/SkRasterPipeline.h | |
parent | c0708a40c723de3450f56194110da5aaf8bb053b (diff) |
Add SkRasterPipeline support to SkModeColorFilter.
The shader leaves its color in r,g,b,a, so to implement this color filter, we move {r,g,b,a} into {dr,dg,db,da}, then load the filter's color in {r,g,b,a}, then apply the xfermode as usual.
I've left a note about how we could sometimes cut a stage for some xfermodes. Similarly we really only need to move_src_dst instead of swap_src_dst, but it seemed handy and less error prone to do a full two way swap. As usual, we can always circle back and fine-tune these things if we want.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3243
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Change-Id: I928c0fb25236eb75cf238134c6bebb53af5ddf07
Reviewed-on: https://skia-review.googlesource.com/3243
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/core/SkRasterPipeline.h')
-rw-r--r-- | src/core/SkRasterPipeline.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h index 3ef8c50d9f..05947fcb59 100644 --- a/src/core/SkRasterPipeline.h +++ b/src/core/SkRasterPipeline.h @@ -91,6 +91,7 @@ public: enum StockStage { just_return, + swap_src_dst, store_565, store_srgb, |