Plumb GrBackendFormat into the GrPrimitiveProcessor::TextureSampler
This is not a substantive CL. It is just setting up for removing the
usage of the GrGpu in the creation of the GrProgramDesc.
Change-Id: Ic24204de256862e5e780626bde3a44f4d735c6e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249121
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ops/GrQuadPerEdgeAA.cpp b/src/gpu/ops/GrQuadPerEdgeAA.cpp
index 27bd00e..929824c 100644
--- a/src/gpu/ops/GrQuadPerEdgeAA.cpp
+++ b/src/gpu/ops/GrQuadPerEdgeAA.cpp
@@ -732,13 +732,13 @@
}
static sk_sp<GrGeometryProcessor> Make(const VertexSpec& vertexSpec, const GrShaderCaps& caps,
- GrTextureType textureType,
+ const GrBackendFormat& backendFormat,
const GrSamplerState& samplerState,
const GrSwizzle& swizzle, uint32_t extraSamplerKey,
sk_sp<GrColorSpaceXform> textureColorSpaceXform,
Saturate saturate) {
return sk_sp<QuadPerEdgeAAGeometryProcessor>(new QuadPerEdgeAAGeometryProcessor(
- vertexSpec, caps, textureType, samplerState, swizzle, extraSamplerKey,
+ vertexSpec, caps, backendFormat, samplerState, swizzle, extraSamplerKey,
std::move(textureColorSpaceXform), saturate));
}
@@ -939,7 +939,7 @@
QuadPerEdgeAAGeometryProcessor(const VertexSpec& spec,
const GrShaderCaps& caps,
- GrTextureType textureType,
+ const GrBackendFormat& backendFormat,
const GrSamplerState& samplerState,
const GrSwizzle& swizzle,
uint32_t extraSamplerKey,
@@ -948,7 +948,7 @@
: INHERITED(kQuadPerEdgeAAGeometryProcessor_ClassID)
, fSaturate(saturate)
, fTextureColorSpaceXform(std::move(textureColorSpaceXform))
- , fSampler(textureType, samplerState, swizzle, extraSamplerKey) {
+ , fSampler(samplerState, backendFormat, swizzle, extraSamplerKey) {
SkASSERT(spec.hasLocalCoords());
this->initializeAttrs(spec);
this->setTextureSamplerCnt(1);
@@ -1029,12 +1029,12 @@
}
sk_sp<GrGeometryProcessor> MakeTexturedProcessor(const VertexSpec& spec, const GrShaderCaps& caps,
- GrTextureType textureType,
+ const GrBackendFormat& backendFormat,
const GrSamplerState& samplerState,
const GrSwizzle& swizzle, uint32_t extraSamplerKey,
sk_sp<GrColorSpaceXform> textureColorSpaceXform,
Saturate saturate) {
- return QuadPerEdgeAAGeometryProcessor::Make(spec, caps, textureType, samplerState, swizzle,
+ return QuadPerEdgeAAGeometryProcessor::Make(spec, caps, backendFormat, samplerState, swizzle,
extraSamplerKey, std::move(textureColorSpaceXform),
saturate);
}