Switch from querying swizzle on caps to using swizzles stored on proxies.
Change-Id: I03f4a3affd6dda7a83bee8eec768dcaa93a6b801
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220534
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/gl/GrGLUniformHandler.cpp b/src/gpu/gl/GrGLUniformHandler.cpp
index dc75504..256eaef 100644
--- a/src/gpu/gl/GrGLUniformHandler.cpp
+++ b/src/gpu/gl/GrGLUniformHandler.cpp
@@ -61,6 +61,7 @@
GrGLSLUniformHandler::SamplerHandle GrGLUniformHandler::addSampler(const GrTexture* texture,
const GrSamplerState&,
+ const GrSwizzle& swizzle,
const char* name,
const GrShaderCaps* shaderCaps) {
SkASSERT(name && strlen(name));
@@ -69,7 +70,6 @@
char prefix = 'u';
fProgramBuilder->nameVariable(&mangleName, prefix, name, true);
- GrSwizzle swizzle = shaderCaps->configTextureSwizzle(texture->config());
GrTextureType type = texture->texturePriv().textureType();
UniformInfo& sampler = fSamplers.push_back();