diff options
author | 2015-09-22 06:41:59 -0700 | |
---|---|---|
committer | 2015-09-22 06:42:00 -0700 | |
commit | 87ba62e67c9ed0c453754a5341255829075c8e22 (patch) | |
tree | e7d9afe6c7079a78a1436dded8a1449d77534d1a /include/gpu/GrFragmentProcessor.h | |
parent | 106b12427e642d067dd5b48664eb693653853583 (diff) |
Replace GrExtractAlphaFragmentProcessor with DstIn compose processor
Review URL: https://codereview.chromium.org/1347943003
Diffstat (limited to 'include/gpu/GrFragmentProcessor.h')
-rw-r--r-- | include/gpu/GrFragmentProcessor.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h index a5e0d98c4d..4b0e1e12d0 100644 --- a/include/gpu/GrFragmentProcessor.h +++ b/include/gpu/GrFragmentProcessor.h @@ -23,6 +23,16 @@ class GrProcessorKeyBuilder; */ class GrFragmentProcessor : public GrProcessor { public: + /** + * In many instances (e.g. SkShader::asFragmentProcessor() implementations) it is desirable to + * only consider the input color's alpha. However, there is a competing desire to have reusable + * GrFragmentProcessor subclasses that can be used in other scenarios where the entire input + * color is considered. This function exists to filter the input color and pass it to a FP. It + * 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 const GrFragmentProcessor* MulOuputByInputAlpha(const GrFragmentProcessor*); + GrFragmentProcessor() : INHERITED() , fUsesLocalCoords(false) |