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

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

Issue 1666773002: Clean up GrGLSLFragmentProcessor-derived classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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/GrDitherEffect.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 #include "GrConvolutionEffect.h" 8 #include "GrConvolutionEffect.h"
9 #include "glsl/GrGLSLFragmentProcessor.h" 9 #include "glsl/GrGLSLFragmentProcessor.h"
10 #include "glsl/GrGLSLFragmentShaderBuilder.h" 10 #include "glsl/GrGLSLFragmentShaderBuilder.h"
11 #include "glsl/GrGLSLProgramDataManager.h" 11 #include "glsl/GrGLSLProgramDataManager.h"
12 #include "glsl/GrGLSLUniformHandler.h" 12 #include "glsl/GrGLSLUniformHandler.h"
13 13
14 // For brevity 14 // For brevity
15 typedef GrGLSLProgramDataManager::UniformHandle UniformHandle; 15 typedef GrGLSLProgramDataManager::UniformHandle UniformHandle;
16 16
17 class GrGLConvolutionEffect : public GrGLSLFragmentProcessor { 17 class GrGLConvolutionEffect : public GrGLSLFragmentProcessor {
18 public: 18 public:
19 GrGLConvolutionEffect(const GrProcessor&); 19 GrGLConvolutionEffect(const GrProcessor&);
20 20
21 virtual void emitCode(EmitArgs&) override; 21 void emitCode(EmitArgs&) override;
22 22
23 static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessor KeyBuilder*); 23 static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessor KeyBuilder*);
24 24
25 protected: 25 protected:
26 void onSetData(const GrGLSLProgramDataManager& pdman, const GrProcessor&) ov erride; 26 void onSetData(const GrGLSLProgramDataManager& pdman, const GrProcessor&) ov erride;
27 27
28 private: 28 private:
29 int width() const { return Gr1DKernelEffect::WidthFromRadius(fRadius); } 29 int width() const { return Gr1DKernelEffect::WidthFromRadius(fRadius); }
30 bool useBounds() const { return fUseBounds; } 30 bool useBounds() const { return fUseBounds; }
31 Gr1DKernelEffect::Direction direction() const { return fDirection; } 31 Gr1DKernelEffect::Direction direction() const { return fDirection; }
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 233
234 bool useBounds = d->fRandom->nextBool(); 234 bool useBounds = d->fRandom->nextBool();
235 return GrConvolutionEffect::Create(d->fTextures[texIdx], 235 return GrConvolutionEffect::Create(d->fTextures[texIdx],
236 dir, 236 dir,
237 radius, 237 radius,
238 kernel, 238 kernel,
239 useBounds, 239 useBounds,
240 bounds); 240 bounds);
241 } 241 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConvexPolyEffect.cpp ('k') | src/gpu/effects/GrDitherEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698