Update FragmentProcessor TextureSampler to hold an GrSurfaceProxyView.
In future CLs I will update the Ops that create the TextureSamplers to pass
the GrSurfaceProxyView in.
Bug: skia:9556
Change-Id: I550dab64974d32e4c3047188063efa2d0832328e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259164
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp
index 38161c6..c1e5cd3 100644
--- a/src/gpu/GrProgramDesc.cpp
+++ b/src/gpu/GrProgramDesc.cpp
@@ -64,9 +64,10 @@
}
for (int i = 0; i < numTextureSamplers; ++i) {
const GrFragmentProcessor::TextureSampler& sampler = fp.textureSampler(i);
- const GrBackendFormat& backendFormat = sampler.proxy()->backendFormat();
+ const GrBackendFormat& backendFormat = sampler.view().proxy()->backendFormat();
- uint32_t samplerKey = sampler_key(backendFormat.textureType(), sampler.swizzle(), caps);
+ uint32_t samplerKey = sampler_key(backendFormat.textureType(), sampler.view().swizzle(),
+ caps);
b->add32(samplerKey);
caps.addExtraSamplerKey(b, sampler.samplerState(), backendFormat);