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

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

Issue 699943003: Move GrInvariantOutput out of GrProcessor and into its own class. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Cleanup Created 6 years, 1 month 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/GrConvexPolyEffect.cpp ('k') | src/gpu/effects/GrCustomCoordsTextureEffect.h » ('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 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
11 #include "Gr1DKernelEffect.h" 11 #include "Gr1DKernelEffect.h"
12 #include "GrInvariantOutput.h"
12 13
13 class GrGLConvolutionEffect; 14 class GrGLConvolutionEffect;
14 15
15 /** 16 /**
16 * A convolution effect. The kernel is specified as an array of 2 * half-width 17 * A convolution effect. The kernel is specified as an array of 2 * half-width
17 * + 1 weights. Each texel is multiplied by it's weight and summed to determine 18 * + 1 weights. Each texel is multiplied by it's weight and summed to determine
18 * the output color. The output color is modulated by the input color. 19 * the output color. The output color is modulated by the input color.
19 */ 20 */
20 class GrConvolutionEffect : public Gr1DKernelEffect { 21 class GrConvolutionEffect : public Gr1DKernelEffect {
21 22
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 91
91 /// Convolve with a Gaussian kernel 92 /// Convolve with a Gaussian kernel
92 GrConvolutionEffect(GrTexture*, Direction, 93 GrConvolutionEffect(GrTexture*, Direction,
93 int halfWidth, 94 int halfWidth,
94 float gaussianSigma, 95 float gaussianSigma,
95 bool useBounds, 96 bool useBounds,
96 float bounds[2]); 97 float bounds[2]);
97 98
98 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; 99 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE;
99 100
100 virtual void onComputeInvariantOutput(InvariantOutput* inout) const { 101 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const {
101 // If the texture was opaque we could know that the output color if we k new the sum of the 102 // If the texture was opaque we could know that the output color if we k new the sum of the
102 // kernel values. 103 // kernel values.
103 inout->mulByUnknownColor(); 104 inout->mulByUnknownColor();
104 } 105 }
105 106
106 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 107 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
107 108
108 typedef Gr1DKernelEffect INHERITED; 109 typedef Gr1DKernelEffect INHERITED;
109 }; 110 };
110 111
111 #endif 112 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConvexPolyEffect.cpp ('k') | src/gpu/effects/GrCustomCoordsTextureEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698