summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Pat Manning <patmanning@google.com> 2024-03-25 21:17:45 +0000
committer Pat Manning <patmanning@google.com> 2024-03-25 21:21:02 +0000
commit666c5c5f3533b548d27d452944c5947c2b596f47 (patch)
tree0fa50a2e7c57eac44a6feefac8ce7b9e02101eae
parent8ea9ae468c67a408f071f327badb0c0361fa7cd6 (diff)
Update sprite surface when desired width or height changes.
Previously only updating when increasing. Bug: 331260947 Bug: 305193969 Test: Manual Flag: ACONFIG com.android.systemui.enable_vector_cursors TRUNKFOOD Change-Id: I3ae6fb398e31a7b9aca6bfdcc5a39136cc6d85af
-rw-r--r--libs/input/SpriteController.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/input/SpriteController.cpp b/libs/input/SpriteController.cpp
index 6a32c5a71999..a63453d655e2 100644
--- a/libs/input/SpriteController.cpp
+++ b/libs/input/SpriteController.cpp
@@ -148,8 +148,9 @@ void SpriteController::doUpdateSprites() {
if (update.state.wantSurfaceVisible()) {
int32_t desiredWidth = update.state.icon.width();
int32_t desiredHeight = update.state.icon.height();
- if (update.state.surfaceWidth < desiredWidth
- || update.state.surfaceHeight < desiredHeight) {
+ // TODO(b/331260947): investigate using a larger surface width with smaller sprites.
+ if (update.state.surfaceWidth != desiredWidth ||
+ update.state.surfaceHeight != desiredHeight) {
needApplyTransaction = true;
update.state.surfaceControl->updateDefaultBufferSize(desiredWidth, desiredHeight);