diff options
author | Mike Reed <reed@google.com> | 2018-02-01 11:24:53 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-01 18:19:00 +0000 |
commit | 28eaed254dcd73b42c15b73528f349cccd7797e5 (patch) | |
tree | a344776f400032405b2496eb158a6912d01ea8e0 /src/gpu/GrFragmentProcessor.h | |
parent | 48825b11ad25c98b9a4884d5cc0edd4e290c4409 (diff) |
add gpu impl for shadermaskfilter
adds MulChildAlphaByInput
renames MulOutputByInputAlpha --> MulChildByInputAlpha
Bug: skia:7500
Change-Id: Ic0615d4d23a887fbee510901ed77a36f98a1b11d
Reviewed-on: https://skia-review.googlesource.com/102440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/gpu/GrFragmentProcessor.h')
-rw-r--r-- | src/gpu/GrFragmentProcessor.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gpu/GrFragmentProcessor.h b/src/gpu/GrFragmentProcessor.h index 4ec92627ad..fa674d5d80 100644 --- a/src/gpu/GrFragmentProcessor.h +++ b/src/gpu/GrFragmentProcessor.h @@ -33,8 +33,17 @@ public: * does so by returning a parent FP that multiplies the passed in FPs output by the parent's * input alpha. The passed in FP will not receive an input color. */ - static std::unique_ptr<GrFragmentProcessor> MulOutputByInputAlpha( - std::unique_ptr<GrFragmentProcessor>); + static std::unique_ptr<GrFragmentProcessor> MulChildByInputAlpha( + std::unique_ptr<GrFragmentProcessor> child); + + /** + * Like MulChildByInputAlpha(), but reverses the sense of src and dst. In this case, return + * the input modulated by the child's alpha. The passed in FP will not receive an input color. + * + * output = input * child.a + */ + static std::unique_ptr<GrFragmentProcessor> MulInputByChildAlpha( + std::unique_ptr<GrFragmentProcessor> child); /** * This assumes that the input color to the returned processor will be unpremul and that the |