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

Unified Diff: src/gpu/effects/GrConvolutionEffect.h

Issue 608253002: Add isSingleComponent bool to getConstantColorComponent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update comment and nits Created 6 years, 3 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
Index: src/gpu/effects/GrConvolutionEffect.h
diff --git a/src/gpu/effects/GrConvolutionEffect.h b/src/gpu/effects/GrConvolutionEffect.h
index f2a2d5a779d484a1e38a7448933c57d814f3d3d0..1e5c2840084876f0023bab04a9a59a024436a712 100644
--- a/src/gpu/effects/GrConvolutionEffect.h
+++ b/src/gpu/effects/GrConvolutionEffect.h
@@ -64,12 +64,6 @@ public:
virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERRIDE;
- virtual void getConstantColorComponents(GrColor*, uint32_t* validFlags) const {
- // If the texture was opaque we could know that the output color if we knew the sum of the
- // kernel values.
- *validFlags = 0;
- }
-
enum {
// This was decided based on the min allowed value for the max texture
// samples per fragment program run in DX9SM2 (32). A sigma param of 4.0
@@ -103,6 +97,13 @@ private:
virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE;
+ virtual void onComputeInvarientOutput(InvarientOutput* invarientOutput) const {
+ // If the texture was opaque we could know that the output color if we knew the sum of the
+ // kernel values.
+ invarientOutput->validFlags = 0;
+ invarientOutput->isSingleComponent = false;
+ }
+
GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
typedef Gr1DKernelEffect INHERITED;

Powered by Google App Engine
This is Rietveld 408576698