libweston: Avoid using the surface's output when emitting a timeline
This is an odd corner case where the surface doesn't yet have an output assigned -- noticed when starting up with the RDP backend and fullscreen-shell, and we attempt to emit a timeline point for a surface without an output assigned, causing weston to crash when that happens. Rather than trying to catch this in the timeline code, still emit the flush damage timeline but instead of using the output the surface is on, use the output that accumulates damage. Suggested-by: Derek Foreman <derek.foreman@collabora.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
70b03b2928
commit
7086b9eac2
|
@ -2639,7 +2639,7 @@ buffer_can_be_accessed_BANDAID_XXX(struct weston_buffer_reference buffer_ref)
|
|||
}
|
||||
|
||||
static void
|
||||
surface_flush_damage(struct weston_surface *surface)
|
||||
surface_flush_damage(struct weston_surface *surface, struct weston_output *output)
|
||||
{
|
||||
struct weston_buffer *buffer = surface->buffer_ref.buffer;
|
||||
|
||||
|
@ -2648,8 +2648,8 @@ surface_flush_damage(struct weston_surface *surface)
|
|||
surface->compositor->renderer->flush_damage(surface, buffer);
|
||||
|
||||
if (pixman_region32_not_empty(&surface->damage))
|
||||
TL_POINT(surface->compositor, "core_flush_damage", TLP_SURFACE(surface),
|
||||
TLP_OUTPUT(surface->output), TLP_END);
|
||||
TL_POINT(surface->compositor, "core_flush_damage",
|
||||
TLP_SURFACE(surface), TLP_OUTPUT(output), TLP_END);
|
||||
|
||||
pixman_region32_clear(&surface->damage);
|
||||
}
|
||||
|
@ -2728,7 +2728,7 @@ output_accumulate_damage(struct weston_output *output)
|
|||
continue;
|
||||
pnode->surface->touched = true;
|
||||
|
||||
surface_flush_damage(pnode->surface);
|
||||
surface_flush_damage(pnode->surface, output);
|
||||
|
||||
/* Both the renderer and the backend have seen the buffer
|
||||
* by now. If renderer needs the buffer, it has its own
|
||||
|
|
Loading…
Reference in New Issue