Index: src/gpu/effects/GrConvexPolyEffect.cpp |
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp |
index 4857a9e96d6231b5b75d91736f6cf11316a2a9a9..836596a76130c168f10d4e5d078fc873c63e3643 100644 |
--- a/src/gpu/effects/GrConvexPolyEffect.cpp |
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp |
@@ -29,17 +29,6 @@ public: |
return SkNEW_ARGS(AARectEffect, (edgeType, rect)); |
} |
- virtual void getConstantColorComponents(GrColor* color, |
- uint32_t* validFlags) const SK_OVERRIDE { |
- if (fRect.isEmpty()) { |
- // An empty rect will have no coverage anywhere. |
- *color = 0x00000000; |
- *validFlags = kRGBA_GrColorComponentFlags; |
- } else { |
- *validFlags = 0; |
- } |
- } |
- |
GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } |
virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERRIDE; |
@@ -54,6 +43,17 @@ private: |
return fRect == aare.fRect; |
} |
+ virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE { |
+ if (fRect.isEmpty()) { |
+ // An empty rect will have no coverage anywhere. |
+ inout->fColor = 0x00000000; |
+ inout->fValidFlags = kRGBA_GrColorComponentFlags; |
+ } else { |
+ inout->fValidFlags = 0; |
+ } |
+ inout->fIsSingleComponent = false; |
+ } |
+ |
SkRect fRect; |
GrPrimitiveEdgeType fEdgeType; |
@@ -328,8 +328,9 @@ GrFragmentProcessor* GrConvexPolyEffect::Create(GrPrimitiveEdgeType edgeType, co |
GrConvexPolyEffect::~GrConvexPolyEffect() {} |
-void GrConvexPolyEffect::getConstantColorComponents(GrColor* color, uint32_t* validFlags) const { |
- *validFlags = 0; |
+void GrConvexPolyEffect::onComputeInvariantOutput(InvariantOutput* inout) const { |
+ inout->fValidFlags = 0; |
+ inout->fIsSingleComponent = false; |
} |
const GrBackendFragmentProcessorFactory& GrConvexPolyEffect::getFactory() const { |