summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-07-08 16:53:23 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-08 16:53:23 -0700
commit3b240117d110e261de430127534f7bb460f67dab (patch)
tree06b6b9dea16e87be6f24283d4127f7a0182fb7c1 /libs
parente5f5e82027f551d70eecdcbafec864ed07fb67b1 (diff)
parent40c4b86b72d416585335940f928124426d715e59 (diff)
downloadframeworks_base-3b240117d110e261de430127534f7bb460f67dab.zip
frameworks_base-3b240117d110e261de430127534f7bb460f67dab.tar.gz
frameworks_base-3b240117d110e261de430127534f7bb460f67dab.tar.bz2
Merge "Align paths on pixel boundaries when rasterizing in bitmaps. Bug #5003739"
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/ShapeCache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/ShapeCache.h b/libs/hwui/ShapeCache.h
index b048469..f4d9686 100644
--- a/libs/hwui/ShapeCache.h
+++ b/libs/hwui/ShapeCache.h
@@ -537,7 +537,7 @@ PathTexture* ShapeCache<Entry>::addTexture(const Entry& entry, const SkPath *pat
const float pathWidth = fmax(bounds.width(), 1.0f);
const float pathHeight = fmax(bounds.height(), 1.0f);
- const float offset = fmax(paint->getStrokeWidth(), 1.0f) * 1.5f;
+ const float offset = (int) floorf(fmax(paint->getStrokeWidth(), 1.0f) * 1.5f + 0.5f);
const uint32_t width = uint32_t(pathWidth + offset * 2.0 + 0.5);
const uint32_t height = uint32_t(pathHeight + offset * 2.0 + 0.5);