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

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

Issue 1109863004: Use GLSLCaps for creating processor keys and GLSL-specific programs (Closed) Base URL: https://chromium.googlesource.com/skia@master
Patch Set: Created 5 years, 7 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/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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 virtual ~GrConvolutionEffect(); 53 virtual ~GrConvolutionEffect();
54 54
55 const float* kernel() const { return fKernel; } 55 const float* kernel() const { return fKernel; }
56 56
57 const float* bounds() const { return fBounds; } 57 const float* bounds() const { return fBounds; }
58 bool useBounds() const { return fUseBounds; } 58 bool useBounds() const { return fUseBounds; }
59 59
60 const char* name() const override { return "Convolution"; } 60 const char* name() const override { return "Convolution"; }
61 61
62 void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const overri de; 62 void getGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const over ride;
63 63
64 GrGLFragmentProcessor* createGLInstance() const override; 64 GrGLFragmentProcessor* createGLInstance() const override;
65 65
66 enum { 66 enum {
67 // This was decided based on the min allowed value for the max texture 67 // This was decided based on the min allowed value for the max texture
68 // samples per fragment program run in DX9SM2 (32). A sigma param of 4.0 68 // samples per fragment program run in DX9SM2 (32). A sigma param of 4.0
69 // on a blur filter gives a kernel width of 25 while a sigma of 5.0 69 // on a blur filter gives a kernel width of 25 while a sigma of 5.0
70 // would exceed a 32 wide kernel. 70 // would exceed a 32 wide kernel.
71 kMaxKernelRadius = 12, 71 kMaxKernelRadius = 12,
72 // With a C++11 we could have a constexpr version of WidthFromRadius() 72 // With a C++11 we could have a constexpr version of WidthFromRadius()
(...skipping 28 matching lines...) Expand all
101 // kernel values. 101 // kernel values.
102 inout->mulByUnknownFourComponents(); 102 inout->mulByUnknownFourComponents();
103 } 103 }
104 104
105 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 105 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
106 106
107 typedef Gr1DKernelEffect INHERITED; 107 typedef Gr1DKernelEffect INHERITED;
108 }; 108 };
109 109
110 #endif 110 #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