OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrGLSLTextureSampler_DEFINED | 8 #ifndef GrGLSLTextureSampler_DEFINED |
9 #define GrGLSLTextureSampler_DEFINED | 9 #define GrGLSLTextureSampler_DEFINED |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... | |
21 : fSamplerUniform(uniform) | 21 : fSamplerUniform(uniform) |
22 , fConfig(access.getTexture()->config()) { | 22 , fConfig(access.getTexture()->config()) { |
23 SkASSERT(kUnknown_GrPixelConfig != fConfig); | 23 SkASSERT(kUnknown_GrPixelConfig != fConfig); |
24 memcpy(fSwizzle, access.getSwizzle(), 5); | 24 memcpy(fSwizzle, access.getSwizzle(), 5); |
25 } | 25 } |
26 | 26 |
27 GrPixelConfig config() const { return fConfig; } | 27 GrPixelConfig config() const { return fConfig; } |
28 // this is .abcd | 28 // this is .abcd |
29 const char* swizzle() const { return fSwizzle; } | 29 const char* swizzle() const { return fSwizzle; } |
30 | 30 |
31 GrSLType samplerType() const { return fSamplerType; } | |
32 | |
31 private: | 33 private: |
34 GrSLType fSamplerType; | |
egdaniel
2015/11/20 21:57:43
do you set fSampleType anywhere?
bsalomon
2015/11/20 22:43:55
woops, this was an old way of doing things, remove
| |
32 UniformHandle fSamplerUniform; | 35 UniformHandle fSamplerUniform; |
33 GrPixelConfig fConfig; | 36 GrPixelConfig fConfig; |
34 char fSwizzle[5]; | 37 char fSwizzle[5]; |
35 | 38 |
36 friend class GrGLSLShaderBuilder; | 39 friend class GrGLSLShaderBuilder; |
37 }; | 40 }; |
38 | 41 |
39 #endif | 42 #endif |
OLD | NEW |