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

Unified Diff: src/gpu/effects/GrRRectEffect.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/GrOvalEffect.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrRRectEffect.cpp
diff --git a/src/gpu/effects/GrRRectEffect.cpp b/src/gpu/effects/GrRRectEffect.cpp
index f5131feba4bd3f7277378a2281694c9d021894d0..0af564c844f651bac60ab2c5c81fc58fed95b303 100644
--- a/src/gpu/effects/GrRRectEffect.cpp
+++ b/src/gpu/effects/GrRRectEffect.cpp
@@ -59,8 +59,6 @@ public:
typedef GLCircularRRectEffect GLProcessor;
- virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
-
virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERRIDE;
private:
@@ -68,6 +66,8 @@ private:
virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE;
+ virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE;
+
SkRRect fRRect;
GrPrimitiveEdgeType fEdgeType;
uint32_t fCircularCornerFlags;
@@ -86,8 +86,9 @@ GrFragmentProcessor* CircularRRectEffect::Create(GrPrimitiveEdgeType edgeType,
return SkNEW_ARGS(CircularRRectEffect, (edgeType, circularCornerFlags, rrect));
}
-void CircularRRectEffect::getConstantColorComponents(GrColor* color, uint32_t* validFlags) const {
- *validFlags = 0;
+void CircularRRectEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
+ inout->fValidFlags = 0;
+ inout->fIsSingleComponent = false;
}
const GrBackendFragmentProcessorFactory& CircularRRectEffect::getFactory() const {
@@ -399,8 +400,6 @@ public:
typedef GLEllipticalRRectEffect GLProcessor;
- virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
-
virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERRIDE;
private:
@@ -408,6 +407,8 @@ private:
virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE;
+ virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE;
+
SkRRect fRRect;
GrPrimitiveEdgeType fEdgeType;
@@ -424,8 +425,9 @@ EllipticalRRectEffect::Create(GrPrimitiveEdgeType edgeType, const SkRRect& rrect
return SkNEW_ARGS(EllipticalRRectEffect, (edgeType, rrect));
}
-void EllipticalRRectEffect::getConstantColorComponents(GrColor* color, uint32_t* validFlags) const {
- *validFlags = 0;
+void EllipticalRRectEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
+ inout->fValidFlags = 0;
+ inout->fIsSingleComponent = false;
}
const GrBackendFragmentProcessorFactory& EllipticalRRectEffect::getFactory() const {
« no previous file with comments | « src/gpu/effects/GrOvalEffect.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698