summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2024-03-05 13:26:17 -0500
committer John Reck <jreck@google.com> 2024-03-05 13:26:17 -0500
commit904174c35f2cd25ab93f1510f569f4e260f56b0d (patch)
tree4e47251e092e0fdb1f3f6bc973e41dba12b89c05
parent9b5907be653a8552288545b9bd57d0dc1ca975ef (diff)
Fix blurry downscaled VectorDrawables
The original change was made because the cache could be shared between two different views on screen at once. This is no longer really possible thanks to commit 549ee05ac5458d04f8a5dab36cd3bff951e565ff so this workaround is no longer needed, and now just causes quality loss. Restore strict equality check for cache hits, which also matches VectorDrawableCompat behavior. Test: verified b/32780212 didn't regress Fixes: 265838627 Change-Id: I5a01064f3fd8090238af6cde54ccb2cce1168bca
-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 2ea4e3f21163..af169f4bc4cd 100644
--- a/libs/hwui/VectorDrawable.cpp
+++ b/libs/hwui/VectorDrawable.cpp
@@ -540,7 +540,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) {