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

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

Issue 1434313002: Make all GrFragmentProcessors GL independent. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/GrConvolutionEffect.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 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 bool useBounds, 73 bool useBounds,
74 float bounds[2]); 74 float bounds[2]);
75 75
76 /// Convolve with a Gaussian kernel 76 /// Convolve with a Gaussian kernel
77 GrConvolutionEffect(GrTexture*, Direction, 77 GrConvolutionEffect(GrTexture*, Direction,
78 int halfWidth, 78 int halfWidth,
79 float gaussianSigma, 79 float gaussianSigma,
80 bool useBounds, 80 bool useBounds,
81 float bounds[2]); 81 float bounds[2]);
82 82
83 GrGLFragmentProcessor* onCreateGLInstance() const override; 83 GrGLSLFragmentProcessor* onCreateGLInstance() const override;
84 84
85 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov erride; 85 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov erride;
86 86
87 bool onIsEqual(const GrFragmentProcessor&) const override; 87 bool onIsEqual(const GrFragmentProcessor&) const override;
88 88
89 void onComputeInvariantOutput(GrInvariantOutput* inout) const override { 89 void onComputeInvariantOutput(GrInvariantOutput* inout) const override {
90 // If the texture was opaque we could know that the output color if we k new the sum of the 90 // If the texture was opaque we could know that the output color if we k new the sum of the
91 // kernel values. 91 // kernel values.
92 inout->mulByUnknownFourComponents(); 92 inout->mulByUnknownFourComponents();
93 } 93 }
94 94
95 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 95 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
96 96
97 typedef Gr1DKernelEffect INHERITED; 97 typedef Gr1DKernelEffect INHERITED;
98 }; 98 };
99 99
100 #endif 100 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConvexPolyEffect.cpp ('k') | src/gpu/effects/GrConvolutionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698