Remove SkTMin and SkTMax
Use std::min and std::max everywhere.
SkTPin still exists. We can't use std::clamp yet, and even when
we can, it has undefined behavior with NaN. SkTPin is written
to ensure that we return a value in the [lo, hi] range.
Change-Id: I506852a36e024ae405358d5078a872e2c77fa71e
Docs-Preview: https://skia.org/?cl=269357
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269357
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index 986b32c..a867fcb 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -427,7 +427,7 @@
: fView(std::move(view)), fSamplerState(samplerState) {
GrSurfaceProxy* proxy = this->proxy();
fSamplerState.setFilterMode(
- SkTMin(samplerState.filter(),
+ std::min(samplerState.filter(),
GrTextureProxy::HighestFilterMode(proxy->backendFormat().textureType())));
}
@@ -441,7 +441,7 @@
fSamplerState = samplerState;
GrSurfaceProxy* surfProxy = this->proxy();
fSamplerState.setFilterMode(
- SkTMin(samplerState.filter(),
+ std::min(samplerState.filter(),
GrTextureProxy::HighestFilterMode(surfProxy->backendFormat().textureType())));
}
@@ -453,7 +453,7 @@
fSamplerState = samplerState;
fSamplerState.setFilterMode(
- SkTMin(samplerState.filter(),
+ std::min(samplerState.filter(),
GrTextureProxy::HighestFilterMode(this->proxy()->backendFormat().textureType())));
}
#endif