Index: src/gpu/glsl/GrGLSLTextureSampler.h |
diff --git a/src/gpu/glsl/GrGLSLTextureSampler.h b/src/gpu/glsl/GrGLSLTextureSampler.h |
index fd8bcb26e904a315471e73008161eb386a8cc459..a4fbf550f25039dad0ed20d013b6a86abe8b0551 100644 |
--- a/src/gpu/glsl/GrGLSLTextureSampler.h |
+++ b/src/gpu/glsl/GrGLSLTextureSampler.h |
@@ -21,13 +21,17 @@ |
: fSamplerUniform(uniform) |
, fConfig(access.getTexture()->config()) { |
SkASSERT(kUnknown_GrPixelConfig != fConfig); |
+ memcpy(fSwizzle, access.getSwizzle(), 5); |
} |
GrPixelConfig config() const { return fConfig; } |
+ // this is .abcd |
+ const char* swizzle() const { return fSwizzle; } |
private: |
UniformHandle fSamplerUniform; |
GrPixelConfig fConfig; |
+ char fSwizzle[5]; |
friend class GrGLSLShaderBuilder; |
}; |