mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 13:48:21 +02:00
surface-state: Flag buffer params as dirty if replacing deleted buffer
This makes replacing an invalid/deleted buffer distinguishable from a regular buffer update. This will be important when we try to reuse plane states in a later commit. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
dd74ed6db0
commit
67172d6f8f
1 changed files with 10 additions and 0 deletions
|
|
@ -249,6 +249,16 @@ weston_surface_attach(struct weston_surface *surface,
|
|||
}
|
||||
}
|
||||
|
||||
/* The buffer was destroyed (!old_buffer->resource), so set the
|
||||
* BUFFER_PARAMS_DIRTY bit.
|
||||
*
|
||||
* This is because backends can opportunistically reuse plane state
|
||||
* if only the buffer has changed, but a buffer changing from invalid
|
||||
* to valid needs action.
|
||||
*/
|
||||
if (old_buffer && !old_buffer->resource)
|
||||
pnode_changes |= WESTON_PAINT_NODE_BUFFER_PARAMS_DIRTY;
|
||||
|
||||
if (!old_buffer ||
|
||||
buffer->pixel_format != old_buffer->pixel_format ||
|
||||
buffer->format_modifier != old_buffer->format_modifier) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue