OLD | NEW |
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 GrTextureDomainEffect_DEFINED | 8 #ifndef GrTextureDomainEffect_DEFINED |
9 #define GrTextureDomainEffect_DEFINED | 9 #define GrTextureDomainEffect_DEFINED |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 * Call this from GrGLSLFragmentProcessor::emitCode() to sample the text
ure W.R.T. the | 107 * Call this from GrGLSLFragmentProcessor::emitCode() to sample the text
ure W.R.T. the |
108 * domain and mode. | 108 * domain and mode. |
109 * | 109 * |
110 * @param outcolor name of vec4 variable to hold the sampled color. | 110 * @param outcolor name of vec4 variable to hold the sampled color. |
111 * @param inCoords name of vec2 variable containing the coords to be us
ed with the domain. | 111 * @param inCoords name of vec2 variable containing the coords to be us
ed with the domain. |
112 * It is assumed that this is a variable and not an exp
ression. | 112 * It is assumed that this is a variable and not an exp
ression. |
113 * @param inModulateColor if non-nullptr the sampled color will be mod
ulated with this | 113 * @param inModulateColor if non-nullptr the sampled color will be mod
ulated with this |
114 * expression before being written to outColor. | 114 * expression before being written to outColor. |
115 */ | 115 */ |
116 void sampleTexture(GrGLSLShaderBuilder* builder, | 116 void sampleTexture(GrGLSLShaderBuilder* builder, |
| 117 const GrGLSLCaps* glslCaps, |
117 const GrTextureDomain& textureDomain, | 118 const GrTextureDomain& textureDomain, |
118 const char* outColor, | 119 const char* outColor, |
119 const SkString& inCoords, | 120 const SkString& inCoords, |
120 const GrGLSLTextureSampler& sampler, | 121 const GrGLSLTextureSampler& sampler, |
121 const char* inModulateColor = nullptr); | 122 const char* inModulateColor = nullptr); |
122 | 123 |
123 /** | 124 /** |
124 * Call this from GrGLSLFragmentProcessor::setData() to upload uniforms
necessary for the | 125 * Call this from GrGLSLFragmentProcessor::setData() to upload uniforms
necessary for the |
125 * texture domain. The rectangle is automatically adjusted to account fo
r the texture's | 126 * texture domain. The rectangle is automatically adjusted to account fo
r the texture's |
126 * origin. | 127 * origin. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 bool onIsEqual(const GrFragmentProcessor&) const override; | 204 bool onIsEqual(const GrFragmentProcessor&) const override; |
204 | 205 |
205 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; | 206 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; |
206 | 207 |
207 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 208 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
208 | 209 |
209 typedef GrSingleTextureEffect INHERITED; | 210 typedef GrSingleTextureEffect INHERITED; |
210 }; | 211 }; |
211 | 212 |
212 #endif | 213 #endif |
OLD | NEW |