diff options
| author | 2024-03-26 09:53:34 +0000 | |
|---|---|---|
| committer | 2024-03-26 09:53:34 +0000 | |
| commit | 2d42327fd8da245b43dde9d50c234dd7729669ad (patch) | |
| tree | 9ac8f0a41cf47aa27a97cabce6c1a5096e0933eb /libs/input/SpriteController.cpp | |
| parent | 99e09fc820babe7c0601c18f49ee7038451a7a00 (diff) | |
| parent | 666c5c5f3533b548d27d452944c5947c2b596f47 (diff) | |
Merge "Update sprite surface when desired width or height changes." into main
Diffstat (limited to 'libs/input/SpriteController.cpp')
| -rw-r--r-- | libs/input/SpriteController.cpp | 5 |
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); |