Slim down GrFragmentProcessor::TextureSampler and GrPrimitiveProcessor::TextureSampler
I'm gearing up to add a GrBackendFormat to GrPrimitiveProcessor::TextureSampler so this CL just reduces the API surface area I'll need to alter.
The GrFragmentProcess::TextureSampler changes just keep it aligned with its "twin".
Change-Id: Ia9ece03ca76b4f6c8ebdaf0e0ba0061ecde6c5f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248558
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ccpr/GrCCClipProcessor.cpp b/src/gpu/ccpr/GrCCClipProcessor.cpp
index 73537e6..75535dd 100644
--- a/src/gpu/ccpr/GrCCClipProcessor.cpp
+++ b/src/gpu/ccpr/GrCCClipProcessor.cpp
@@ -20,8 +20,7 @@
, fClipPath(clipPath)
, fIsCoverageCount(IsCoverageCount::kYes == isCoverageCount)
, fMustCheckBounds(MustCheckBounds::kYes == mustCheckBounds)
- , fAtlasAccess(sk_ref_sp(fClipPath->atlasLazyProxy()), GrSamplerState::Filter::kNearest,
- GrSamplerState::WrapMode::kClamp) {
+ , fAtlasAccess(sk_ref_sp(fClipPath->atlasLazyProxy()), GrSamplerState::ClampNearest()) {
SkASSERT(fAtlasAccess.proxy());
this->setTextureSamplerCnt(1);
}
diff --git a/src/gpu/ccpr/GrCCPathProcessor.cpp b/src/gpu/ccpr/GrCCPathProcessor.cpp
index dd6bcae..9fba60d 100644
--- a/src/gpu/ccpr/GrCCPathProcessor.cpp
+++ b/src/gpu/ccpr/GrCCPathProcessor.cpp
@@ -84,8 +84,8 @@
const SkMatrix& viewMatrixIfUsingLocalCoords)
: INHERITED(kGrCCPathProcessor_ClassID)
, fCoverageMode(coverageMode)
- , fAtlasAccess(atlasTexture->texturePriv().textureType(), GrSamplerState::Filter::kNearest,
- GrSamplerState::WrapMode::kClamp, swizzle)
+ , fAtlasAccess(atlasTexture->texturePriv().textureType(), GrSamplerState::ClampNearest(),
+ swizzle)
, fAtlasSize(SkISize::Make(atlasTexture->width(), atlasTexture->height()))
, fAtlasOrigin(atlasOrigin) {
// TODO: Can we just assert that atlas has GrCCAtlas::kTextureOrigin and remove fAtlasOrigin?