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/GrPrimitiveProcessor.h b/src/gpu/GrPrimitiveProcessor.h
index 44e9fcf..41f37a3 100644
--- a/src/gpu/GrPrimitiveProcessor.h
+++ b/src/gpu/GrPrimitiveProcessor.h
@@ -246,29 +246,23 @@
//////////////////////////////////////////////////////////////////////////////
/**
- * Used to represent a texture that is required by a GrPrimitiveProcessor. It holds a GrTextureProxy
- * along with an associated GrSamplerState. TextureSamplers don't perform any coord manipulation to
- * account for texture origin.
+ * Used to capture the properties of the GrTextureProxies required/expected by a primitiveProcessor
+ * along with an associated GrSamplerState. The actual proxies used are stored in either the
+ * fixed or dynamic state arrays. TextureSamplers don't perform any coord manipulation to account
+ * for texture origin.
*/
class GrPrimitiveProcessor::TextureSampler {
public:
TextureSampler() = default;
TextureSampler(GrTextureType, const GrSamplerState&, const GrSwizzle&,
- uint32_t extraSamplerKey);
-
- explicit TextureSampler(GrTextureType, GrSamplerState::Filter,
- GrSamplerState::WrapMode wrapXAndY, const GrSwizzle&);
+ uint32_t extraSamplerKey = 0);
TextureSampler(const TextureSampler&) = delete;
TextureSampler& operator=(const TextureSampler&) = delete;
void reset(GrTextureType, const GrSamplerState&, const GrSwizzle&,
uint32_t extraSamplerKey = 0);
- void reset(GrTextureType,
- GrSamplerState::Filter,
- GrSamplerState::WrapMode wrapXAndY,
- const GrSwizzle& swizzle);
GrTextureType textureType() const { return fTextureType; }