On Thu,  5 Jul 2018 18:16:29 +0100
Daniel Stone <[email protected]> wrote:

> e2e80136334f fixed the same issue as df573031d0ba in a different way.
> The latter commit (applied earlier in the upstream tree) adds a variable
> to assign_planes to keep track of when we successfully assign a view to
> the scanout plane, and doesn't call prepare_scanout_view if we have.
> 
> The former commit adds this checking inside prepare_scanout_view: if the
> pending output state already has a framebuffer assigned to the scanout
> plane, we drop out of prepare_scanout_view early. The picked_scanout
> variable inside assign_planes can thus be removed.
> 
> Signed-off-by: Daniel Stone <[email protected]>
> Tested-by: Emre Ucan <[email protected]>
> ---
>  libweston/compositor-drm.c | 11 ++---------
>  1 file changed, 2 insertions(+), 9 deletions(-)

Reviewed-by: Pekka Paalanen <[email protected]>


> 
> diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
> index c6b82ac44..cfd7d268f 100644
> --- a/libweston/compositor-drm.c
> +++ b/libweston/compositor-drm.c
> @@ -3053,7 +3053,6 @@ drm_assign_planes(struct weston_output *output_base, 
> void *repaint_data)
>       struct weston_view *ev;
>       pixman_region32_t surface_overlap, renderer_region;
>       struct weston_plane *primary, *next_plane;
> -     bool picked_scanout = false;
>  
>       assert(!output->state_last);
>       state = drm_output_state_duplicate(output->state_cur,
> @@ -3101,19 +3100,13 @@ drm_assign_planes(struct weston_output *output_base, 
> void *repaint_data)
>                                         &ev->transform.boundingbox);
>  
>               next_plane = NULL;
> -             if (pixman_region32_not_empty(&surface_overlap) || 
> picked_scanout)
> +             if (pixman_region32_not_empty(&surface_overlap))
>                       next_plane = primary;
>               if (next_plane == NULL)
>                       next_plane = drm_output_prepare_cursor_view(state, ev);
>  
> -             /* If a higher-stacked view already got assigned to scanout, 
> it's incorrect to
> -              * assign a subsequent (lower-stacked) view to scanout.
> -              */
> -             if (next_plane == NULL) {
> +             if (next_plane == NULL)
>                       next_plane = drm_output_prepare_scanout_view(state, ev);
> -                     if (next_plane)
> -                             picked_scanout = true;
> -             }
>  
>               if (next_plane == NULL)
>                       next_plane = drm_output_prepare_overlay_view(state, ev);

Attachment: pgpV0XGkmlIFh.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to