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

Unified Diff: src/gpu/effects/GrOvalEffect.cpp

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/GrMatrixConvolutionEffect.h ('k') | src/gpu/effects/GrRRectEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrOvalEffect.cpp
diff --git a/src/gpu/effects/GrOvalEffect.cpp b/src/gpu/effects/GrOvalEffect.cpp
index 10fd8a6bf41768bf3b63e0929eb3e2ecb40ba052..2a04e16611feb6e39a1a896961ad7002500e3bc1 100644
--- a/src/gpu/effects/GrOvalEffect.cpp
+++ b/src/gpu/effects/GrOvalEffect.cpp
@@ -32,8 +32,6 @@ public:
typedef GLCircleEffect GLProcessor;
- virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
-
virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERRIDE;
private:
@@ -41,6 +39,8 @@ private:
virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE;
+ virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE;
+
SkPoint fCenter;
SkScalar fRadius;
GrPrimitiveEdgeType fEdgeType;
@@ -56,8 +56,9 @@ GrFragmentProcessor* CircleEffect::Create(GrPrimitiveEdgeType edgeType, const Sk
return SkNEW_ARGS(CircleEffect, (edgeType, center, radius));
}
-void CircleEffect::getConstantColorComponents(GrColor* color, uint32_t* validFlags) const {
- *validFlags = 0;
+void CircleEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
+ inout->fValidFlags = 0;
+ inout->fIsSingleComponent = false;
}
const GrBackendFragmentProcessorFactory& CircleEffect::getFactory() const {
@@ -204,8 +205,6 @@ public:
typedef GLEllipseEffect GLProcessor;
- virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
-
virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERRIDE;
private:
@@ -213,6 +212,8 @@ private:
virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE;
+ virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE;
+
SkPoint fCenter;
SkVector fRadii;
GrPrimitiveEdgeType fEdgeType;
@@ -230,8 +231,9 @@ GrFragmentProcessor* EllipseEffect::Create(GrPrimitiveEdgeType edgeType,
return SkNEW_ARGS(EllipseEffect, (edgeType, center, rx, ry));
}
-void EllipseEffect::getConstantColorComponents(GrColor* color, uint32_t* validFlags) const {
- *validFlags = 0;
+void EllipseEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
+ inout->fValidFlags = 0;
+ inout->fIsSingleComponent = false;
}
const GrBackendFragmentProcessorFactory& EllipseEffect::getFactory() const {
« no previous file with comments | « src/gpu/effects/GrMatrixConvolutionEffect.h ('k') | src/gpu/effects/GrRRectEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698