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

Unified Diff: src/effects/gradients/SkGradientShader.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/SkTableColorFilter.cpp ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkGradientShader.cpp
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index 87cca3bf9c876ebfd08bc6ecb72b61ca5cc5d0b9..af21ffc77e86b2ef3d9dd94daec867d0230374d0 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -1213,12 +1213,11 @@ bool GrGradientEffect::onIsEqual(const GrProcessor& processor) const {
}
void GrGradientEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
- if (fIsOpaque && inout->isOpaque()) {
- inout->fValidFlags = kA_GrColorComponentFlag;
+ if (fIsOpaque) {
+ inout->mulByUnknownOpaqueColor();
} else {
- inout->fValidFlags = 0;
+ inout->mulByUnknownColor();
}
- inout->fIsSingleComponent = false;
}
int GrGradientEffect::RandomGradientParams(SkRandom* random,
« no previous file with comments | « src/effects/SkTableColorFilter.cpp ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698