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/Patch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/hwui/Patch.cpp') diff --git a/libs/hwui/Patch.cpp b/libs/hwui/Patch.cpp index f4dd943c7cd2..6a7dfb3890d3 100644 --- a/libs/hwui/Patch.cpp +++ b/libs/hwui/Patch.cpp @@ -119,7 +119,7 @@ Patch::Patch(const float bitmapWidth, const float bitmapHeight, } float vOffset = y1 == y2 ? 0.0f : 0.5 - (0.5 * segment / (y2 - y1)); - float v2 = fmax(0.0f, stepY - vOffset) / bitmapHeight; + float v2 = std::max(0.0f, stepY - vOffset) / bitmapHeight; v1 += vOffset / bitmapHeight; if (stepY > 0.0f) { @@ -167,7 +167,7 @@ void Patch::generateRow(const int32_t* xDivs, uint32_t xCount, TextureVertex*& v } float uOffset = x1 == x2 ? 0.0f : 0.5 - (0.5 * segment / (x2 - x1)); - float u2 = fmax(0.0f, stepX - uOffset) / bitmapWidth; + float u2 = std::max(0.0f, stepX - uOffset) / bitmapWidth; u1 += uOffset / bitmapWidth; if (stepX > 0.0f) { -- cgit v1.2.3-59-g8ed1b