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

Unified Diff: src/effects/SkTableColorFilter.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/effects/SkPerlinNoiseShader.cpp ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkTableColorFilter.cpp
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index b0e61cad56ba806c33460bbb7b4e5ff127f2ad2e..487968b703511c0b0334e48948a1045ce60c854c 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -404,19 +404,20 @@ bool ColorTableEffect::onIsEqual(const GrProcessor& sBase) const {
void ColorTableEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
// If we kept the table in the effect then we could actually run known inputs through the
// table.
+ uint8_t invalidateFlags = 0;
if (fFlags & SkTable_ColorFilter::kR_Flag) {
- inout->fValidFlags &= ~kR_GrColorComponentFlag;
+ invalidateFlags |= kR_GrColorComponentFlag;
}
if (fFlags & SkTable_ColorFilter::kG_Flag) {
- inout->fValidFlags &= ~kG_GrColorComponentFlag;
+ invalidateFlags |= kG_GrColorComponentFlag;
}
if (fFlags & SkTable_ColorFilter::kB_Flag) {
- inout->fValidFlags &= ~kB_GrColorComponentFlag;
+ invalidateFlags |= kB_GrColorComponentFlag;
}
if (fFlags & SkTable_ColorFilter::kA_Flag) {
- inout->fValidFlags &= ~kA_GrColorComponentFlag;
+ invalidateFlags |= kA_GrColorComponentFlag;
}
- inout->fIsSingleComponent = false;
+ inout->invalidateComponents(invalidateFlags);
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698