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

Unified Diff: src/effects/SkTableColorFilter.cpp

Issue 617853003: Revert of Add isSingleComponent bool to getConstantColorComponent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 f6726ca0782f79cb5ecf2a38979d503a3f391fdf..4853f73e5c1e7461500b4906a6d145f9275ece65 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -294,20 +294,20 @@
static const char* Name() { return "ColorTable"; }
virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERRIDE;
+ virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
+
typedef GLColorTableEffect GLProcessor;
private:
virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE;
- virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE;
-
explicit ColorTableEffect(GrTexture* texture, unsigned flags);
GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
GrTextureAccess fTextureAccess;
unsigned fFlags; // currently not used in shader code, just to assist
- // onComputeInvariantOutput().
+ // getConstantColorComponents().
typedef GrFragmentProcessor INHERITED;
};
@@ -401,22 +401,21 @@
return this->texture(0) == sBase.texture(0);
}
-void ColorTableEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
+void ColorTableEffect::getConstantColorComponents(GrColor* color, uint32_t* validFlags) const {
// If we kept the table in the effect then we could actually run known inputs through the
// table.
if (fFlags & SkTable_ColorFilter::kR_Flag) {
- inout->fValidFlags &= ~kR_GrColorComponentFlag;
+ *validFlags &= ~kR_GrColorComponentFlag;
}
if (fFlags & SkTable_ColorFilter::kG_Flag) {
- inout->fValidFlags &= ~kG_GrColorComponentFlag;
+ *validFlags &= ~kG_GrColorComponentFlag;
}
if (fFlags & SkTable_ColorFilter::kB_Flag) {
- inout->fValidFlags &= ~kB_GrColorComponentFlag;
+ *validFlags &= ~kB_GrColorComponentFlag;
}
if (fFlags & SkTable_ColorFilter::kA_Flag) {
- inout->fValidFlags &= ~kA_GrColorComponentFlag;
- }
- inout->fIsSingleComponent = false;
+ *validFlags &= ~kA_GrColorComponentFlag;
+ }
}
« 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