Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: src/effects/SkAlphaThresholdFilter.cpp

Issue 643743003: Create helper functions to use in computeInvariantOutput calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update blurMaskFilter Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | src/effects/SkArithmeticMode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkAlphaThresholdFilter.cpp
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 7215aa83723ec774e0ef233f16e649ac3fd4c262..823c3028c51e76df00aa7c188f41a3eb5c0b5be6 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -229,12 +229,11 @@ bool AlphaThresholdEffect::onIsEqual(const GrProcessor& sBase) const {
}
void AlphaThresholdEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
- if (inout->isOpaque() && GrPixelConfigIsOpaque(this->texture(0)->config())) {
- inout->fValidFlags = kA_GrColorComponentFlag;
+ if (GrPixelConfigIsOpaque(this->texture(0)->config()) && fOuterThreshold >= 1.f) {
+ inout->mulByUnknownOpaqueColor();
} else {
- inout->fValidFlags = 0;
+ inout->mulByUnknownColor();
}
- inout->fIsSingleComponent = false;
}
#endif
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | src/effects/SkArithmeticMode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698