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

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

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