diff options
author | 2012-04-27 11:47:13 -0700 | |
---|---|---|
committer | 2012-04-27 11:47:13 -0700 | |
commit | fdd6fc1beb5076a630c7066b8b1731995636c09f (patch) | |
tree | 8df0ddc48fda9ffb9015e3fb190e68ca806646d4 /libs/hwui/PathCache.cpp | |
parent | a44a63ac5c29b2cc57df95ec495def8cdddd9c6f (diff) |
Work-around for a Skia rasterization bug
Bug #6411457
Skia does not generates the bottom right pixel of a rect when
drawing a rect as an SkPath into an alpha8 bitmap.
Change-Id: Ifb5286ae67745c9e44ee387b6d6ad607a9a2e6ce
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r-- | libs/hwui/PathCache.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp index e363b73498df..71a4ed7966ed 100644 --- a/libs/hwui/PathCache.cpp +++ b/libs/hwui/PathCache.cpp @@ -25,10 +25,15 @@ namespace android { namespace uirenderer { // Defined in ShapeCache.h -void computePathBounds(const SkPath *path, const SkPaint* paint, + +void computePathBounds(const SkPath* path, const SkPaint* paint, float& left, float& top, float& offset, uint32_t& width, uint32_t& height) { const SkRect& bounds = path->getBounds(); + computeBounds(bounds, paint, left, top, offset, width, height); +} +void computeBounds(const SkRect& bounds, const SkPaint* paint, + float& left, float& top, float& offset, uint32_t& width, uint32_t& height) { const float pathWidth = fmax(bounds.width(), 1.0f); const float pathHeight = fmax(bounds.height(), 1.0f); |