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

Unified Diff: src/gpu/effects/GrSingleTextureEffect.h

Issue 608253002: Add isSingleComponent bool to getConstantColorComponent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix isSolidWhite 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/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/effects/GrTextureDomain.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrSingleTextureEffect.h
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h
index 6349ee7896af677ba06dcc679445719b7e42a805..cba322eab4e32256703e10d9b01a797e0fe5e1cf 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -44,16 +44,15 @@ protected:
}
/**
- * Can be used as a helper to implement subclass getConstantColorComponents(). It assumes that
+ * Can be used as a helper to implement subclass onComputeInvariantOutput(). It assumes that
* the subclass output color will be a modulation of the input color with a value read from the
* texture.
*/
- void updateConstantColorComponentsForModulation(GrColor* color, uint32_t* validFlags) const {
- if ((*validFlags & kA_GrColorComponentFlag) && 0xFF == GrColorUnpackA(*color) &&
- GrPixelConfigIsOpaque(this->texture(0)->config())) {
- *validFlags = kA_GrColorComponentFlag;
+ void updateInvariantOutputForModulation(InvariantOutput* inout) const {
+ if (inout->isOpaque() && GrPixelConfigIsOpaque(this->texture(0)->config())) {
+ inout->fValidFlags = kA_GrColorComponentFlag;
} else {
- *validFlags = 0;
+ inout->fValidFlags = 0;
}
}
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/effects/GrTextureDomain.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698