MirResizeEvent's width/height fields are not in sync with the next buffer the client receives
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Triaged
|
Medium
|
Unassigned | ||
mir (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
MirResizeEvent's width/height fields are not in sync with the next buffer the client receives.
This is because they represent the latest dimensions of a surface. However, due to compositing and frame scheduling, MirResizeEvent arrives a significant time before the client gets any buffers with the new dimensions. So if the client actually tries to use the width/height provided in MirResizeEvent, it will render incorrectly with ugly artefacts.
Clients should always be using the latest _buffer_ dimensions, and not the latest surface dimensions. As demonstrated in examples/* the latest buffer dimensions are available via:
mir_buffer_
mir_buffer_
eglSwapBuff
if (eglQuerySurfac
{
}
This is current best practice, and will result in smooth client resizing. Unfortunately it means the width/height fields in the MirResizeEvent structure should be ignored. Perhaps we need to deprecate them, or perhaps we should enhance them to represent buffer dimensions instead...
tags: | added: resize |
tags: | added: xmir |
Changed in mir: | |
assignee: | Daniel van Vugt (vanvugt) → nobody |
Is there any news on this? Does event 2.0 fixes it?