diff options
author | 2013-03-13 14:31:46 -0700 | |
---|---|---|
committer | 2013-03-13 14:32:45 -0700 | |
commit | 0f809f3b794174f044366bf421f8d0c72d9afc14 (patch) | |
tree | d4ca14f787cf7c511f5236637b5e3edb29d4c49f /libs/hwui/PathCache.cpp | |
parent | d6c87ccde6722c7dedd05a18f30d8634893e10ee (diff) |
Prevent infinite loop when trimming the path cache
Change-Id: I04b5fa498336068f997c68d8613b35a99f67adbe
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r-- | libs/hwui/PathCache.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp index afdc2c9cd4ed..fb687cd16ff5 100644 --- a/libs/hwui/PathCache.cpp +++ b/libs/hwui/PathCache.cpp @@ -55,6 +55,8 @@ void PathCache::PathProcessor::onProcess(const sp<Task<SkBitmap*> >& task) { PathCache::drawPath(t->path, t->paint, *bitmap, left, top, offset, width, height); t->setResult(bitmap); } else { + texture->width = 0; + texture->height = 0; t->setResult(NULL); } } @@ -136,8 +138,7 @@ PathTexture* PathCache::get(SkPath* path, SkPaint* paint) { addTexture(entry, bitmap, texture); texture->clearTask(); } else { - ALOGW("Path too large to be rendered into a texture (%dx%d)", - texture->width, texture->height); + ALOGW("Path too large to be rendered into a texture"); texture->clearTask(); texture = NULL; mCache.remove(entry); |