Rework GrSamplerParams to be more compact and use its own wrap mode enum.
The main change is to make GrSamplerParams smaller by making its enums have byte-sized underlying types. The rest is cosmetic.
Change-Id: Ib71ea50612d24619a85e463826c6b8dfb9b445e3
Reviewed-on: https://skia-review.googlesource.com/43200
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/tests/DetermineDomainModeTest.cpp b/tests/DetermineDomainModeTest.cpp
index ee9a694..111194f 100644
--- a/tests/DetermineDomainModeTest.cpp
+++ b/tests/DetermineDomainModeTest.cpp
@@ -23,14 +23,13 @@
public:
using DomainMode = GrTextureProducer::DomainMode;
- static DomainMode DetermineDomainMode(
- const SkRect& constraintRect,
- GrTextureProducer::FilterConstraint filterConstraint,
- bool coordsLimitedToConstraintRect,
- GrTextureProxy* proxy,
- const SkIRect* textureContentArea,
- const GrSamplerParams::FilterMode* filterModeOrNullForBicubic,
- SkRect* domainRect) {
+ static DomainMode DetermineDomainMode(const SkRect& constraintRect,
+ GrTextureProducer::FilterConstraint filterConstraint,
+ bool coordsLimitedToConstraintRect,
+ GrTextureProxy* proxy,
+ const SkIRect* textureContentArea,
+ const GrSamplerState::Filter* filterModeOrNullForBicubic,
+ SkRect* domainRect) {
return GrTextureProducer::DetermineDomainMode(constraintRect,
filterConstraint,
coordsLimitedToConstraintRect,
@@ -346,15 +345,14 @@
GrTextureProducer_TestAccess::DomainMode actualMode, expectedMode;
SkRect actualDomainRect;
- static const GrSamplerParams::FilterMode gModes[] = {
- GrSamplerParams::kNone_FilterMode,
- GrSamplerParams::kBilerp_FilterMode,
- GrSamplerParams::kMipMap_FilterMode,
+ static const GrSamplerState::Filter gModes[] = {
+ GrSamplerState::Filter::kNearest,
+ GrSamplerState::Filter::kBilerp,
+ GrSamplerState::Filter::kMipMap,
};
- static const GrSamplerParams::FilterMode* gModePtrs[] = {
- &gModes[0], &gModes[1], nullptr, &gModes[2]
- };
+ static const GrSamplerState::Filter* gModePtrs[] = {&gModes[0], &gModes[1], nullptr,
+ &gModes[2]};
static const float gHalfFilterWidth[] = { 0.0f, 0.5f, 1.5f, 10000.0f };