summaryrefslogtreecommitdiffstats
path: root/libs/hwui/PathCache.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-09-30 16:56:56 -0700
committerRomain Guy <romainguy@google.com>2010-09-30 16:57:13 -0700
commitd79991277043d6bdbd90bb63fd8aff73ef9e06a5 (patch)
treefc9133cf5164f2eba24998ce383ebea0fb685c68 /libs/hwui/PathCache.cpp
parent5972e52e15e075e40dfcdc3ffaed1b7c4e2afac1 (diff)
downloadframeworks_base-d79991277043d6bdbd90bb63fd8aff73ef9e06a5.zip
frameworks_base-d79991277043d6bdbd90bb63fd8aff73ef9e06a5.tar.gz
frameworks_base-d79991277043d6bdbd90bb63fd8aff73ef9e06a5.tar.bz2
Make simple paths made of lines work.
Bug #3041098 Change-Id: Ife9c3f01ded10e2bb35b1cdf1a54734d8347fee4
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 70e06a1..377727b 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -138,8 +138,8 @@ PathTexture* PathCache::addTexture(const PathCacheEntry& entry,
const SkPath *path, const SkPaint* paint) {
const SkRect& bounds = path->getBounds();
- const float pathWidth = bounds.width();
- const float pathHeight = bounds.height();
+ const float pathWidth = fmax(bounds.width(), 1.0f);
+ const float pathHeight = fmax(bounds.height(), 1.0f);
if (pathWidth > mMaxTextureSize || pathHeight > mMaxTextureSize) {
LOGW("Path too large to be rendered into a texture");