Stretched screen (briefly) after rotating

Bug #1466510 reported by Gerry Boland
66
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Mir
Invalid
Undecided
Unassigned
mir (Ubuntu)
Undecided
Unassigned
qtmir (Ubuntu)
Undecided
Daniel d'Andrada
qtubuntu (Ubuntu)
Undecided
Daniel d'Andrada
unity8 (Ubuntu)
Undecided
Unassigned

Bug Description

Test on image with shell rotation enabled.

Steps to repro:
1. open app, e.g. system settings.
2. rotate device to landscape, see app adjust to suit.
3. lock phone.
4. rotate device to portrait.
5. unlock phone.

Bug: You see flash of stretched app, before it redraws to look correct.

Think we need to resize/reorient the app sooner.

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtmir (Ubuntu):
status: New → Confirmed
Changed in unity8 (Ubuntu):
status: New → Confirmed
Changed in qtmir:
status: New → Confirmed
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in qtmir:
status: Confirmed → In Progress
Changed in qtmir:
assignee: Daniel van Vugt (vanvugt) → nobody
status: In Progress → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The attached branch solves most of the issue. But it's wrong to say the whole bug is solved by it.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Additional suggested improvement: Try animating the resize linearly in proportion to the rotation angle/progress. That way even if the app is slightly behind at the end, it will only be slightly behind with almost the right new dimensions already.

summary: - unlocking phone sometimes shows stretched app
+ Stretched screen (briefly) after rotating
Changed in unity8 (Ubuntu):
status: Confirmed → Invalid
Changed in qtubuntu (Ubuntu):
status: New → In Progress
assignee: nobody → Daniel d'Andrada (dandrader)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

dandrader has just about convinced me that Mir is also broken. If an app receives a resize event and only redraws once per resize event, then the delayed nature of the buffer queue might mean the app stops resizing (answers the last resize event) still using the old buffer dimensions.

We should keep resending resize events till their dimensions match that of the buffer the client last submitted.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Although fixing bug 1288021 well enough might negate the need for an additional Mir fix here.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

We also have a reasonable workaround (arguably a fix) planned for clients like qtubuntu which reduces the need for a Mir fix.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

lp:~dandrader/qtubuntu/resizeCatchUp solves the problem we have currently that by symply rotating an app from portrait to landscape (or vice-versa) you can get the app stretched. Because it didn't consume enough buffers to reach the first one with the new size that was promised on the ResizeEvent

The remaining issue is that when you press the power button to turn the display off and then again to turn it back on, MirSurfaceItem gets resized in the scene but the underlying mir surface does not get resized at all. Likely because the apps was already unfocused and getting suspended by the time the resize takes place

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Note that the symptoms have changed slightly since this bug was originally reported.

Changed in qtmir (Ubuntu):
assignee: nobody → Daniel d'Andrada (dandrader)
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mir (Ubuntu):
status: New → Confirmed
tags: added: resize
Changed in qtmir (Ubuntu):
status: In Progress → Fix Released
Changed in qtmir:
status: Confirmed → Fix Released
Changed in mir (Ubuntu):
status: Confirmed → Invalid
Changed in mir:
status: New → Invalid
Changed in qtubuntu (Ubuntu):
status: In Progress → Fix Released
Michał Sawicz (saviq)
no longer affects: qtmir
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers