Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: src/gpu/glsl/GrGLSLTextureSampler.h

Issue 1426653008: Revert of Create swizzle table inside of glsl caps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/glsl/GrGLSLCaps.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/gpu/glsl/GrGLSLCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698