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

Side by Side Diff: src/gpu/effects/GrBicubicEffect.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, 8 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/GrBezierEffect.cpp ('k') | src/gpu/effects/GrBicubicEffect.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 2013 Google Inc. 2 * Copyright 2013 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 GrBicubicTextureEffect_DEFINED 8 #ifndef GrBicubicTextureEffect_DEFINED
9 #define GrBicubicTextureEffect_DEFINED 9 #define GrBicubicTextureEffect_DEFINED
10 10
11 #include "GrSingleTextureEffect.h" 11 #include "GrSingleTextureEffect.h"
12 #include "GrTextureDomain.h" 12 #include "GrTextureDomain.h"
13 #include "gl/GrGLProcessor.h" 13 #include "gl/GrGLProcessor.h"
14 14
15 class GrGLBicubicEffect; 15 class GrGLBicubicEffect;
16 class GrInvariantOutput; 16 class GrInvariantOutput;
17 17
18 class GrBicubicEffect : public GrSingleTextureEffect { 18 class GrBicubicEffect : public GrSingleTextureEffect {
19 public: 19 public:
20 enum { 20 enum {
21 kFilterTexelPad = 2, // Given a src rect in texels to be filtered, this number of 21 kFilterTexelPad = 2, // Given a src rect in texels to be filtered, this number of
22 // surrounding texels are needed by the kernel in x and y. 22 // surrounding texels are needed by the kernel in x and y.
23 }; 23 };
24 virtual ~GrBicubicEffect(); 24 virtual ~GrBicubicEffect();
25 25
26 const float* coefficients() const { return fCoefficients; } 26 const float* coefficients() const { return fCoefficients; }
27 27
28 const char* name() const override { return "Bicubic"; } 28 const char* name() const override { return "Bicubic"; }
29 29
30 void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const overri de; 30 void getGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const over ride;
31 31
32 GrGLFragmentProcessor* createGLInstance() const override; 32 GrGLFragmentProcessor* createGLInstance() const override;
33 33
34 const GrTextureDomain& domain() const { return fDomain; } 34 const GrTextureDomain& domain() const { return fDomain; }
35 35
36 /** 36 /**
37 * Create a simple filter effect with custom bicubic coefficients and option al domain. 37 * Create a simple filter effect with custom bicubic coefficients and option al domain.
38 */ 38 */
39 static GrFragmentProcessor* Create(GrTexture* tex, const SkScalar coefficien ts[16], 39 static GrFragmentProcessor* Create(GrTexture* tex, const SkScalar coefficien ts[16],
40 const SkRect* domain = NULL) { 40 const SkRect* domain = NULL) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 GrTextureDomain fDomain; 99 GrTextureDomain fDomain;
100 100
101 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 101 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
102 102
103 static const SkScalar gMitchellCoefficients[16]; 103 static const SkScalar gMitchellCoefficients[16];
104 104
105 typedef GrSingleTextureEffect INHERITED; 105 typedef GrSingleTextureEffect INHERITED;
106 }; 106 };
107 107
108 #endif 108 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBezierEffect.cpp ('k') | src/gpu/effects/GrBicubicEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698