From e6a15ee3d0c78eb3f2551d73a7d238c3d8d2f075 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Tue, 7 Jul 2015 18:42:17 -0700 Subject: Remove all usage of fmin and fmax bug:22208220 Removes needless call, and upconversion to doubles in multiple places. Change-Id: I1b949fa5f206446ac34de800154c0147d6bd8034 --- libs/hwui/PathCache.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/hwui/PathCache.cpp') 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); -- cgit v1.2.3-59-g8ed1b