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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 * It is assumed that this is a variable and not an exp
ression. | 113 * It is assumed that this is a variable and not an exp
ression. |
114 * @param inModulateColor if non-nullptr the sampled color will be mod
ulated with this | 114 * @param inModulateColor if non-nullptr the sampled color will be mod
ulated with this |
115 * expression before being written to outColor. | 115 * expression before being written to outColor. |
116 */ | 116 */ |
117 void sampleTexture(GrGLSLShaderBuilder* builder, | 117 void sampleTexture(GrGLSLShaderBuilder* builder, |
118 GrGLSLUniformHandler* uniformHandler, | 118 GrGLSLUniformHandler* uniformHandler, |
119 const GrGLSLCaps* glslCaps, | 119 const GrGLSLCaps* glslCaps, |
120 const GrTextureDomain& textureDomain, | 120 const GrTextureDomain& textureDomain, |
121 const char* outColor, | 121 const char* outColor, |
122 const SkString& inCoords, | 122 const SkString& inCoords, |
123 const GrGLSLSampler& sampler, | 123 GrGLSLFragmentProcessor::SamplerHandle sampler, |
124 const char* inModulateColor = nullptr); | 124 const char* inModulateColor = nullptr); |
125 | 125 |
126 /** | 126 /** |
127 * Call this from GrGLSLFragmentProcessor::setData() to upload uniforms
necessary for the | 127 * Call this from GrGLSLFragmentProcessor::setData() to upload uniforms
necessary for the |
128 * texture domain. The rectangle is automatically adjusted to account fo
r the texture's | 128 * texture domain. The rectangle is automatically adjusted to account fo
r the texture's |
129 * origin. | 129 * origin. |
130 */ | 130 */ |
131 void setData(const GrGLSLProgramDataManager& pdman, const GrTextureDomai
n& textureDomain, | 131 void setData(const GrGLSLProgramDataManager& pdman, const GrTextureDomai
n& textureDomain, |
132 GrSurfaceOrigin textureOrigin); | 132 GrSurfaceOrigin textureOrigin); |
133 | 133 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 bool onIsEqual(const GrFragmentProcessor&) const override; | 206 bool onIsEqual(const GrFragmentProcessor&) const override; |
207 | 207 |
208 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; | 208 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; |
209 | 209 |
210 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 210 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
211 | 211 |
212 typedef GrSingleTextureEffect INHERITED; | 212 typedef GrSingleTextureEffect INHERITED; |
213 }; | 213 }; |
214 | 214 |
215 #endif | 215 #endif |
OLD | NEW |