OLD | NEW |
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 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 } else { | 42 } else { |
43 return new GrBicubicEffect(tex, coefficients, | 43 return new GrBicubicEffect(tex, coefficients, |
44 GrCoordTransform::MakeDivByTextureWHMatri
x(tex), *domain); | 44 GrCoordTransform::MakeDivByTextureWHMatri
x(tex), *domain); |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 /** | 48 /** |
49 * Create a Mitchell filter effect with specified texture matrix and x/y til
e modes. | 49 * Create a Mitchell filter effect with specified texture matrix and x/y til
e modes. |
50 */ | 50 */ |
51 static const GrFragmentProcessor* Create(GrTexture* tex, const SkMatrix& mat
rix, | 51 static const GrFragmentProcessor* Create(GrTexture* tex, const SkMatrix& mat
rix, |
52 SkShader::TileMode tileModes[2]) { | 52 const SkShader::TileMode tileModes[
2]) { |
53 return Create(tex, gMitchellCoefficients, matrix, tileModes); | 53 return Create(tex, gMitchellCoefficients, matrix, tileModes); |
54 } | 54 } |
55 | 55 |
56 /** | 56 /** |
57 * Create a filter effect with custom bicubic coefficients, the texture matr
ix, and the x/y | 57 * Create a filter effect with custom bicubic coefficients, the texture matr
ix, and the x/y |
58 * tilemodes. | 58 * tilemodes. |
59 */ | 59 */ |
60 static const GrFragmentProcessor* Create(GrTexture* tex, const SkScalar coef
ficients[16], | 60 static const GrFragmentProcessor* Create(GrTexture* tex, const SkScalar coef
ficients[16], |
61 const SkMatrix& matrix, | 61 const SkMatrix& matrix, |
62 const SkShader::TileMode tileModes[
2]) { | 62 const SkShader::TileMode tileModes[
2]) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |