summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2015-07-08 03:00:28 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-07-08 03:00:28 +0000
commit41e4d8b3ed044ed724bc340b77d3f9ca60105407 (patch)
tree36084d9b4f9080f972b44d40621ab35659634f84 /libs/hwui/OpenGLRenderer.cpp
parentfb770e48993e1c72603e3a8fe965088e31fdd8e2 (diff)
parent0c218e43b8126eaffb38aa24af8e46e22835c3cb (diff)
am 0c218e43: am 9ca926ad: am fdb87b76: am 127b478a: Merge "Remove all usage of fmin and fmax" into mnc-dev
* commit '0c218e43b8126eaffb38aa24af8e46e22835c3cb': Remove all usage of fmin and fmax
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 87ed84f510ca..ed2a4db9ea05 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1670,10 +1670,10 @@ void OpenGLRenderer::drawBitmap(const SkBitmap* bitmap, Rect src, Rect dst, cons
if (!texture) return;
const AutoTexture autoCleanup(texture);
- Rect uv(fmax(0.0f, src.left / texture->width),
- fmax(0.0f, src.top / texture->height),
- fmin(1.0f, src.right / texture->width),
- fmin(1.0f, src.bottom / texture->height));
+ Rect uv(std::max(0.0f, src.left / texture->width),
+ std::max(0.0f, src.top / texture->height),
+ std::min(1.0f, src.right / texture->width),
+ std::min(1.0f, src.bottom / texture->height));
const int textureFillFlags = (bitmap->colorType() == kAlpha_8_SkColorType)
? TextureFillFlags::IsAlphaMaskTexture : TextureFillFlags::None;
@@ -2450,7 +2450,7 @@ void OpenGLRenderer::drawTextDecorations(float underlineWidth, float x, float y,
if (CC_LIKELY(underlineWidth > 0.0f)) {
const float textSize = paintCopy.getTextSize();
- const float strokeWidth = fmax(textSize * kStdUnderline_Thickness, 1.0f);
+ const float strokeWidth = std::max(textSize * kStdUnderline_Thickness, 1.0f);
const float left = x;
float top = 0.0f;