diff options
author | 2015-07-02 00:37:21 +0000 | |
---|---|---|
committer | 2015-07-02 00:37:21 +0000 | |
commit | b4c02e8ffd0c37b645fa8bb9fc03918a8cfc9a81 (patch) | |
tree | 56674d195ab949f66b12c404e3a5b86ae3ea57b7 /libs/hwui/OpenGLRenderer.cpp | |
parent | 469980b073b44ccd605b089ade3e7a75be441a73 (diff) | |
parent | d3ecb3e6f04a0f76c886238af6bef1d10b987a42 (diff) |
am d3ecb3e6: Merge "Switch from fminf/fmaxf to std::min/max" into mnc-dev
* commit 'd3ecb3e6f04a0f76c886238af6bef1d10b987a42':
Switch from fminf/fmaxf to std::min/max
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 3d48fa698e5b..87ed84f510ca 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -1626,10 +1626,10 @@ void OpenGLRenderer::drawBitmapMesh(const SkBitmap* bitmap, int meshWidth, int m ColorTextureVertex::set(vertex++, vertices[bx], vertices[by], u1, v1, colors[bx / 2]); ColorTextureVertex::set(vertex++, vertices[cx], vertices[cy], u2, v1, colors[cx / 2]); - left = fminf(left, fminf(vertices[ax], fminf(vertices[bx], vertices[cx]))); - top = fminf(top, fminf(vertices[ay], fminf(vertices[by], vertices[cy]))); - right = fmaxf(right, fmaxf(vertices[ax], fmaxf(vertices[bx], vertices[cx]))); - bottom = fmaxf(bottom, fmaxf(vertices[ay], fmaxf(vertices[by], vertices[cy]))); + left = std::min(left, std::min(vertices[ax], std::min(vertices[bx], vertices[cx]))); + top = std::min(top, std::min(vertices[ay], std::min(vertices[by], vertices[cy]))); + right = std::max(right, std::max(vertices[ax], std::max(vertices[bx], vertices[cx]))); + bottom = std::max(bottom, std::max(vertices[ay], std::max(vertices[by], vertices[cy]))); } } @@ -2127,8 +2127,8 @@ bool OpenGLRenderer::findBestFontTransform(const mat4& transform, SkMatrix* outM float sx, sy; transform.decomposeScale(sx, sy); outMatrix->setScale( - roundf(fmaxf(1.0f, sx)), - roundf(fmaxf(1.0f, sy))); + roundf(std::max(1.0f, sx)), + roundf(std::max(1.0f, sy))); return true; } @@ -2551,10 +2551,10 @@ void OpenGLRenderer::drawColorRects(const float* rects, int count, const SkPaint Vertex::set(vertex++, l, b); Vertex::set(vertex++, r, b); - left = fminf(left, l); - top = fminf(top, t); - right = fmaxf(right, r); - bottom = fmaxf(bottom, b); + left = std::min(left, l); + top = std::min(top, t); + right = std::max(right, r); + bottom = std::max(bottom, b); } if (clip && quickRejectSetupScissor(left, top, right, bottom)) { |