OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 GrConvolutionEffect_DEFINED | 8 #ifndef GrConvolutionEffect_DEFINED |
9 #define GrConvolutionEffect_DEFINED | 9 #define GrConvolutionEffect_DEFINED |
10 | 10 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 bool useBounds, | 88 bool useBounds, |
89 float bounds[2]); | 89 float bounds[2]); |
90 | 90 |
91 /// Convolve with a Gaussian kernel | 91 /// Convolve with a Gaussian kernel |
92 GrConvolutionEffect(GrTexture*, Direction, | 92 GrConvolutionEffect(GrTexture*, Direction, |
93 int halfWidth, | 93 int halfWidth, |
94 float gaussianSigma, | 94 float gaussianSigma, |
95 bool useBounds, | 95 bool useBounds, |
96 float bounds[2]); | 96 float bounds[2]); |
97 | 97 |
98 virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE; | 98 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; |
99 | 99 |
100 virtual void onComputeInvariantOutput(InvariantOutput* inout) const { | 100 virtual void onComputeInvariantOutput(InvariantOutput* inout) const { |
101 // If the texture was opaque we could know that the output color if we k
new the sum of the | 101 // If the texture was opaque we could know that the output color if we k
new the sum of the |
102 // kernel values. | 102 // kernel values. |
103 inout->mulByUnknownColor(); | 103 inout->mulByUnknownColor(); |
104 } | 104 } |
105 | 105 |
106 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 106 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
107 | 107 |
108 typedef Gr1DKernelEffect INHERITED; | 108 typedef Gr1DKernelEffect INHERITED; |
109 }; | 109 }; |
110 | 110 |
111 #endif | 111 #endif |
OLD | NEW |