summaryrefslogtreecommitdiff
path: root/libs/hwui/VectorDrawable.cpp
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2016-11-16 10:29:39 -0800
committerTeng-Hui Zhu <ztenghui@google.com>2016-11-16 13:01:02 -0800
commit037fc1815b0f69b0b24e68e16281b490bdeb1d56 (patch)
treeb1fde958597714077f20cc65fc57464a6477de6c /libs/hwui/VectorDrawable.cpp
parent817695589c80cfc0913d94e3dd52dac2782e8ed6 (diff)
Recreate the bitmap cache when it is smaller than needed
fix:32780212 Test: Existing CTS and attached repro apk. Change-Id: Ib908319af6539b2438b850f7a50d5a539cef8368
Diffstat (limited to 'libs/hwui/VectorDrawable.cpp')
-rw-r--r--libs/hwui/VectorDrawable.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/VectorDrawable.cpp b/libs/hwui/VectorDrawable.cpp
index b50647adc0be..8a8f26707845 100644
--- a/libs/hwui/VectorDrawable.cpp
+++ b/libs/hwui/VectorDrawable.cpp
@@ -574,7 +574,7 @@ bool Tree::allocateBitmapIfNeeded(Cache& cache, int width, int height) {
}
bool Tree::canReuseBitmap(Bitmap* bitmap, int width, int height) {
- return bitmap && width == bitmap->width() && height == bitmap->height();
+ return bitmap && width <= bitmap->width() && height <= bitmap->height();
}
void Tree::onPropertyChanged(TreeProperties* prop) {