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

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

Issue 617853003: Revert of Add isSingleComponent bool to getConstantColorComponent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/GrConvexPolyEffect.h ('k') | src/gpu/effects/GrConvolutionEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrConvexPolyEffect.cpp
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp
index 836596a76130c168f10d4e5d078fc873c63e3643..4857a9e96d6231b5b75d91736f6cf11316a2a9a9 100644
--- a/src/gpu/effects/GrConvexPolyEffect.cpp
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp
@@ -29,6 +29,17 @@
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;
@@ -41,17 +52,6 @@
virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE {
const AARectEffect& aare = other.cast<AARectEffect>();
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;
@@ -328,9 +328,8 @@
GrConvexPolyEffect::~GrConvexPolyEffect() {}
-void GrConvexPolyEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
- inout->fValidFlags = 0;
- inout->fIsSingleComponent = false;
+void GrConvexPolyEffect::getConstantColorComponents(GrColor* color, uint32_t* validFlags) const {
+ *validFlags = 0;
}
const GrBackendFragmentProcessorFactory& GrConvexPolyEffect::getFactory() const {
« no previous file with comments | « src/gpu/effects/GrConvexPolyEffect.h ('k') | src/gpu/effects/GrConvolutionEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698