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/FontRenderer.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libs/hwui/FontRenderer.cpp') diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp index 9664f58b1752..35051b7cccea 100644 --- a/libs/hwui/FontRenderer.cpp +++ b/libs/hwui/FontRenderer.cpp @@ -521,10 +521,10 @@ void FontRenderer::appendMeshQuad(float x1, float y1, float u1, float v1, appendMeshQuadNoClip(x1, y1, u1, v1, x2, y2, u2, v2, x3, y3, u3, v3, x4, y4, u4, v4, texture); if (mBounds) { - mBounds->left = fmin(mBounds->left, x1); - mBounds->top = fmin(mBounds->top, y3); - mBounds->right = fmax(mBounds->right, x3); - mBounds->bottom = fmax(mBounds->bottom, y1); + mBounds->left = std::min(mBounds->left, x1); + mBounds->top = std::min(mBounds->top, y3); + mBounds->right = std::max(mBounds->right, x3); + mBounds->bottom = std::max(mBounds->bottom, y1); } if (mCurrentCacheTexture->endOfMesh()) { @@ -539,10 +539,10 @@ void FontRenderer::appendRotatedMeshQuad(float x1, float y1, float u1, float v1, appendMeshQuadNoClip(x1, y1, u1, v1, x2, y2, u2, v2, x3, y3, u3, v3, x4, y4, u4, v4, texture); if (mBounds) { - mBounds->left = fmin(mBounds->left, fmin(x1, fmin(x2, fmin(x3, x4)))); - mBounds->top = fmin(mBounds->top, fmin(y1, fmin(y2, fmin(y3, y4)))); - mBounds->right = fmax(mBounds->right, fmax(x1, fmax(x2, fmax(x3, x4)))); - mBounds->bottom = fmax(mBounds->bottom, fmax(y1, fmax(y2, fmax(y3, y4)))); + mBounds->left = std::min(mBounds->left, std::min(x1, std::min(x2, std::min(x3, x4)))); + mBounds->top = std::min(mBounds->top, std::min(y1, std::min(y2, std::min(y3, y4)))); + mBounds->right = std::max(mBounds->right, std::max(x1, std::max(x2, std::max(x3, x4)))); + mBounds->bottom = std::max(mBounds->bottom, std::max(y1, std::max(y2, std::max(y3, y4)))); } if (mCurrentCacheTexture->endOfMesh()) { -- cgit v1.2.3-59-g8ed1b