Remove GrProgramDesc's need for the GrGpu
Although not strictly necessary, being able to compute the program key w/o needing access to the Gpu will give us more flexibility.
Bug: skia:9455
Change-Id: I0cd76d79a3008b69be18636be370e7aaa531bc65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247686
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ops/GrLatticeOp.cpp b/src/gpu/ops/GrLatticeOp.cpp
index bb98f35..99e4477 100644
--- a/src/gpu/ops/GrLatticeOp.cpp
+++ b/src/gpu/ops/GrLatticeOp.cpp
@@ -96,12 +96,8 @@
GrSamplerState::Filter filter, bool wideColor)
: INHERITED(kLatticeGP_ClassID), fColorSpaceXform(std::move(csxf)) {
- GrSamplerState samplerState = GrSamplerState(GrSamplerState::WrapMode::kClamp, filter);
- uint32_t extraSamplerKey = gpu->getExtraSamplerKeyForProgram(samplerState,
- proxy->backendFormat());
-
- fSampler.reset(samplerState, proxy->backendFormat(), proxy->textureSwizzle(),
- extraSamplerKey);
+ fSampler.reset(GrSamplerState(GrSamplerState::WrapMode::kClamp, filter),
+ proxy->backendFormat(), proxy->textureSwizzle());
this->setTextureSamplerCnt(1);
fInPosition = {"position", kFloat2_GrVertexAttribType, kFloat2_GrSLType};
fInTextureCoords = {"textureCoords", kFloat2_GrVertexAttribType, kFloat2_GrSLType};