summaryrefslogtreecommitdiff
path: root/libs/hwui/PathCache.cpp
diff options
context:
space:
mode:
author sergeyv <sergeyv@google.com> 2016-08-04 16:21:07 -0700
committer sergeyv <sergeyv@google.com> 2016-08-04 17:08:26 -0700
commit89561e6e4201aebc78a76ac055071ad2149db704 (patch)
tree7542873756c907d67c45483b7c5dd504833f4bb1 /libs/hwui/PathCache.cpp
parentd93b9bde90522a7da6a0875a9f33ef9361088449 (diff)
HWUI: Fix snapping in path rendering
bug:30444274 Change-Id: Ib10058659af47625b366c26e0b872fa3f1854cd0
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r--libs/hwui/PathCache.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index b5c43ffb2916..1c298b16154d 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -127,8 +127,8 @@ static void computePathBounds(const SkPath* path, const SkPaint* paint, PathText
const float pathWidth = std::max(bounds.width(), 1.0f);
const float pathHeight = std::max(bounds.height(), 1.0f);
- texture->left = bounds.fLeft;
- texture->top = bounds.fTop;
+ texture->left = floorf(bounds.fLeft);
+ texture->top = floorf(bounds.fTop);
texture->offset = (int) floorf(std::max(paint->getStrokeWidth(), 1.0f) * 1.5f + 0.5f);