summaryrefslogtreecommitdiff
path: root/libs/hwui/TextureCache.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2015-06-30 17:56:13 -0700
committer Chris Craik <ccraik@google.com> 2015-06-30 17:58:21 -0700
commitdf72b63928cc1492b72ba9a4e99d5e714f93ccc6 (patch)
tree38b94479dabc9aea2dfcde3a64348c51bc39cecf /libs/hwui/TextureCache.cpp
parent82b3f67711246ad5beaf7702ce16e9d433406d1e (diff)
Switch from fminf/fmaxf to std::min/max
bug:22208220 Shows considerable improvement in performance, especially in tight loops. Change-Id: I4bcf6584a3c145bfc55e73c9c73dcf6199290b3c
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
-rw-r--r--libs/hwui/TextureCache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index 5147e987253b..fe1b7fdbfbbf 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -93,7 +93,7 @@ void TextureCache::setMaxSize(uint32_t maxSize) {
}
void TextureCache::setFlushRate(float flushRate) {
- mFlushRate = fmaxf(0.0f, fminf(1.0f, flushRate));
+ mFlushRate = std::max(0.0f, std::min(1.0f, flushRate));
}
///////////////////////////////////////////////////////////////////////////////