| Index: src/effects/SkDisplacementMapEffect.cpp
|
| diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
|
| index 474d9a7dc8123f8eec5c76fd3bf5ae95d71f26d7..bcda1d27fa5344c5c16260244b4c3c21905f5fd4 100644
|
| --- a/src/effects/SkDisplacementMapEffect.cpp
|
| +++ b/src/effects/SkDisplacementMapEffect.cpp
|
| @@ -351,11 +351,11 @@ public:
|
| typedef GrGLDisplacementMapEffect GLProcessor;
|
| static const char* Name() { return "DisplacementMap"; }
|
|
|
| - virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
|
| -
|
| private:
|
| virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE;
|
|
|
| + virtual void onComputeInvarientOutput(InvarientOutput* invarientOutput) const SK_OVERRIDE;
|
| +
|
| GrDisplacementMapEffect(SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
|
| SkDisplacementMapEffect::ChannelSelectorType yChannelSelector,
|
| const SkVector& scale,
|
| @@ -491,14 +491,14 @@ const GrBackendFragmentProcessorFactory& GrDisplacementMapEffect::getFactory() c
|
| return GrTBackendFragmentProcessorFactory<GrDisplacementMapEffect>::getInstance();
|
| }
|
|
|
| -void GrDisplacementMapEffect::getConstantColorComponents(GrColor*,
|
| - uint32_t* validFlags) const {
|
| +void GrDisplacementMapEffect::onComputeInvarientOutput(InvarientOutput* invarientOutput) const {
|
| // Any displacement offset bringing a pixel out of bounds will output a color of (0,0,0,0),
|
| // so the only way we'd get a constant alpha is if the input color image has a constant alpha
|
| // and no displacement offset push any texture coordinates out of bounds OR if the constant
|
| // alpha is 0. Since this isn't trivial to compute at this point, let's assume the output is
|
| // not of constant color when a displacement effect is applied.
|
| - *validFlags = 0;
|
| + invarientOutput->validFlags = 0;
|
| + invarientOutput->isSingleComponent = false;
|
| }
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|