| Index: src/gpu/glsl/GrGLSLTextureSampler.h
|
| diff --git a/src/gpu/glsl/GrGLSLTextureSampler.h b/src/gpu/glsl/GrGLSLTextureSampler.h
|
| index 2de0431f580e60a177c26fedeb3dc0463d660df2..2f14cd1013ff3fa0ef1b249bfd9bfc80203d81ce 100644
|
| --- a/src/gpu/glsl/GrGLSLTextureSampler.h
|
| +++ b/src/gpu/glsl/GrGLSLTextureSampler.h
|
| @@ -19,18 +19,19 @@
|
|
|
| GrGLSLTextureSampler(UniformHandle uniform, const GrTextureAccess& access)
|
| : fSamplerUniform(uniform)
|
| - , fConfig(access.getTexture()->config()) {
|
| - SkASSERT(kUnknown_GrPixelConfig != fConfig);
|
| + , fConfigComponentMask(GrPixelConfigComponentMask(access.getTexture()->config())) {
|
| + SkASSERT(0 != fConfigComponentMask);
|
| memcpy(fSwizzle, access.getSwizzle(), 5);
|
| }
|
|
|
| - GrPixelConfig config() const { return fConfig; }
|
| + // bitfield of GrColorComponentFlags present in the texture's config.
|
| + uint32_t configComponentMask() const { return fConfigComponentMask; }
|
| // this is .abcd
|
| const char* swizzle() const { return fSwizzle; }
|
|
|
| private:
|
| UniformHandle fSamplerUniform;
|
| - GrPixelConfig fConfig;
|
| + uint32_t fConfigComponentMask;
|
| char fSwizzle[5];
|
|
|
| friend class GrGLShaderBuilder;
|
|
|