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

Unified Diff: src/effects/SkArithmeticMode.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/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkArithmeticMode.cpp
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index 85af19cf551fd636f31c13d01ce680e8b3394b00..b62b33db9a4ebcf30881104f877ccc001b71ae5f 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -289,8 +289,6 @@ public:
static const char* Name() { return "Arithmetic"; }
GrTexture* backgroundTexture() const { return fBackgroundAccess.getTexture(); }
- virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
-
float k1() const { return fK1; }
float k2() const { return fK2; }
float k3() const { return fK3; }
@@ -300,6 +298,8 @@ public:
private:
virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE;
+ virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE;
+
GrArithmeticEffect(float k1, float k2, float k3, float k4, bool enforcePMColor,
GrTexture* background);
float fK1, fK2, fK3, fK4;
@@ -344,9 +344,10 @@ const GrBackendFragmentProcessorFactory& GrArithmeticEffect::getFactory() const
return GrTBackendFragmentProcessorFactory<GrArithmeticEffect>::getInstance();
}
-void GrArithmeticEffect::getConstantColorComponents(GrColor* color, uint32_t* validFlags) const {
+void GrArithmeticEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
// TODO: optimize this
- *validFlags = 0;
+ inout->fValidFlags = 0;
+ inout->fIsSingleComponent = false;
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698