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

Side by Side Diff: src/gpu/effects/GrMatrixConvolutionEffect.h

Issue 654273002: Push isEqual/onIsEqual down from GrProcessor to subclasses. (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 unified diff | Download patch
« no previous file with comments | « src/gpu/effects/GrDitherEffect.cpp ('k') | src/gpu/effects/GrMatrixConvolutionEffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrMatrixConvolutionEffect_DEFINED 8 #ifndef GrMatrixConvolutionEffect_DEFINED
9 #define GrMatrixConvolutionEffect_DEFINED 9 #define GrMatrixConvolutionEffect_DEFINED
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 GrMatrixConvolutionEffect(GrTexture*, 70 GrMatrixConvolutionEffect(GrTexture*,
71 const SkIRect& bounds, 71 const SkIRect& bounds,
72 const SkISize& kernelSize, 72 const SkISize& kernelSize,
73 const SkScalar* kernel, 73 const SkScalar* kernel,
74 SkScalar gain, 74 SkScalar gain,
75 SkScalar bias, 75 SkScalar bias,
76 const SkIPoint& kernelOffset, 76 const SkIPoint& kernelOffset,
77 GrTextureDomain::Mode tileMode, 77 GrTextureDomain::Mode tileMode,
78 bool convolveAlpha); 78 bool convolveAlpha);
79 79
80 virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE; 80 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE;
81 81
82 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE { 82 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE {
83 // TODO: Try to do better? 83 // TODO: Try to do better?
84 inout->mulByUnknownColor(); 84 inout->mulByUnknownColor();
85 } 85 }
86 86
87 SkIRect fBounds; 87 SkIRect fBounds;
88 SkISize fKernelSize; 88 SkISize fKernelSize;
89 float fKernel[MAX_KERNEL_SIZE]; 89 float fKernel[MAX_KERNEL_SIZE];
90 float fGain; 90 float fGain;
91 float fBias; 91 float fBias;
92 float fKernelOffset[2]; 92 float fKernelOffset[2];
93 bool fConvolveAlpha; 93 bool fConvolveAlpha;
94 GrTextureDomain fDomain; 94 GrTextureDomain fDomain;
95 95
96 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 96 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
97 97
98 typedef GrSingleTextureEffect INHERITED; 98 typedef GrSingleTextureEffect INHERITED;
99 }; 99 };
100 100
101 #endif 101 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDitherEffect.cpp ('k') | src/gpu/effects/GrMatrixConvolutionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698