Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 666c5c5f authored by Pat Manning's avatar Pat Manning
Browse files

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
parent 8ea9ae46
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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);