| Index: src/effects/SkTableColorFilter.cpp
|
| diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
|
| index 4853f73e5c1e7461500b4906a6d145f9275ece65..fa8a1129be1f51b8eb509be262630fe56e95f76d 100644
|
| --- a/src/effects/SkTableColorFilter.cpp
|
| +++ b/src/effects/SkTableColorFilter.cpp
|
| @@ -294,20 +294,20 @@ public:
|
| 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 onComputeInvarientOutput(InvarientOutput* invarientOutput) 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
|
| - // getConstantColorComponents().
|
| + // onComputeInvarientOutput().
|
|
|
| typedef GrFragmentProcessor INHERITED;
|
| };
|
| @@ -401,21 +401,22 @@ bool ColorTableEffect::onIsEqual(const GrProcessor& sBase) const {
|
| return this->texture(0) == sBase.texture(0);
|
| }
|
|
|
| -void ColorTableEffect::getConstantColorComponents(GrColor* color, uint32_t* validFlags) const {
|
| +void ColorTableEffect::onComputeInvarientOutput(InvarientOutput* invarientOutput) 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) {
|
| - *validFlags &= ~kR_GrColorComponentFlag;
|
| + invarientOutput->validFlags &= ~kR_GrColorComponentFlag;
|
| }
|
| if (fFlags & SkTable_ColorFilter::kG_Flag) {
|
| - *validFlags &= ~kG_GrColorComponentFlag;
|
| + invarientOutput->validFlags &= ~kG_GrColorComponentFlag;
|
| }
|
| if (fFlags & SkTable_ColorFilter::kB_Flag) {
|
| - *validFlags &= ~kB_GrColorComponentFlag;
|
| + invarientOutput->validFlags &= ~kB_GrColorComponentFlag;
|
| }
|
| if (fFlags & SkTable_ColorFilter::kA_Flag) {
|
| - *validFlags &= ~kA_GrColorComponentFlag;
|
| + invarientOutput->validFlags &= ~kA_GrColorComponentFlag;
|
| }
|
| + invarientOutput->isSingleComponent = false;
|
| }
|
|
|
|
|
|
|