diff options
author | Mike Reed <reed@google.com> | 2017-05-05 12:23:42 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-05 19:25:26 +0000 |
commit | 9444bdd32b4a3dcd1c5ac4099adade1b5ba167b7 (patch) | |
tree | 6dd54beb731f323a63c9ea829de8857c5897e5b4 /src | |
parent | 912876b38a3c32a7fd4a1b7ee4d3a000b2dc46df (diff) |
composecolorfilter can now append stages
Bug: skia:
Change-Id: I46b54e5fd09de16b467142a5501b226273182d52
Reviewed-on: https://skia-review.googlesource.com/15615
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkColorFilter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/SkColorFilter.cpp b/src/core/SkColorFilter.cpp index 166d772668..6dcee068ea 100644 --- a/src/core/SkColorFilter.cpp +++ b/src/core/SkColorFilter.cpp @@ -102,6 +102,16 @@ public: } #endif + bool onAppendStages(SkRasterPipeline* p, SkColorSpace* dst, SkArenaAlloc* scratch, + bool shaderIsOpaque) const override { + bool innerIsOpaque = shaderIsOpaque; + if (!(fInner->getFlags() & kAlphaUnchanged_Flag)) { + innerIsOpaque = false; + } + return fInner->appendStages(p, dst, scratch, shaderIsOpaque) && + fOuter->appendStages(p, dst, scratch, innerIsOpaque); + } + #if SK_SUPPORT_GPU sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext* context, SkColorSpace* dstColorSpace) const override { |