diff options
author | Romain Guy <romainguy@google.com> | 2011-07-08 16:50:15 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2011-07-08 16:50:15 -0700 |
commit | 40c4b86b72d416585335940f928124426d715e59 (patch) | |
tree | c756ad5004f059a975f4ded4d544717ae732bfb1 /libs/hwui | |
parent | d4b5795e5efd05be7e482e013dfdec519ad2601e (diff) | |
download | frameworks_base-40c4b86b72d416585335940f928124426d715e59.zip frameworks_base-40c4b86b72d416585335940f928124426d715e59.tar.gz frameworks_base-40c4b86b72d416585335940f928124426d715e59.tar.bz2 |
Align paths on pixel boundaries when rasterizing in bitmaps.
Bug #5003739
Change-Id: I3dfbf4eb92e2c870f33c96947a7d6439e3730965
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/ShapeCache.h | 2 |
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); |