summaryrefslogtreecommitdiff
path: root/libs/hwui/PathCache.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2015-07-08 02:46:05 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-07-08 02:46:05 +0000
commit0c218e43b8126eaffb38aa24af8e46e22835c3cb (patch)
tree8763d395c039dca64cc20c10272a2ceba327a909 /libs/hwui/PathCache.cpp
parent817820cb488f6bb04418ddc8fefb6164a9eeef69 (diff)
parent9ca926adbb5c3503300bdd52266daf503e14113a (diff)
am 9ca926ad: am fdb87b76: am 127b478a: Merge "Remove all usage of fmin and fmax" into mnc-dev
* commit '9ca926adbb5c3503300bdd52266daf503e14113a': Remove all usage of fmin and fmax
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r--libs/hwui/PathCache.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index e4666046fa3f..3af640f76365 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -91,13 +91,13 @@ void PathCache::computePathBounds(const SkPath* path, const SkPaint* paint,
void PathCache::computeBounds(const SkRect& bounds, const SkPaint* paint,
float& left, float& top, float& offset, uint32_t& width, uint32_t& height) {
- const float pathWidth = fmax(bounds.width(), 1.0f);
- const float pathHeight = fmax(bounds.height(), 1.0f);
+ const float pathWidth = std::max(bounds.width(), 1.0f);
+ const float pathHeight = std::max(bounds.height(), 1.0f);
left = bounds.fLeft;
top = bounds.fTop;
- offset = (int) floorf(fmax(paint->getStrokeWidth(), 1.0f) * 1.5f + 0.5f);
+ offset = (int) floorf(std::max(paint->getStrokeWidth(), 1.0f) * 1.5f + 0.5f);
width = uint32_t(pathWidth + offset * 2.0 + 0.5);
height = uint32_t(pathHeight + offset * 2.0 + 0.5);