[PATCH xserver] xwayland: use pixmap size on present flip

Michel Dänzer michel at daenzer.net
Fri Jun 8 14:17:16 UTC 2018


On 2018-06-08 04:13 PM, Olivier Fourdan wrote:
> If the pixmap size does not match the present box size, flickering
> occurs.
> 
> This can happen when the client changes its size (e.g. switching to
> fullscreen), and since the buffer is kept as long as the pixmap is
> valid, once the buffer is created, it remains at the wrong (old) size
> and causes continuous flickering.
> 
> Use the actual pixmap's drawable size instead of the present box to
> create the buffer so that it's sized appropriately.
> 
> Bugzilla: https://bugs.freedesktop.org/106841
> Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
> ---
>  hw/xwayland/xwayland-present.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
> index 4db0d1efc..32727310f 100644
> --- a/hw/xwayland/xwayland-present.c
> +++ b/hw/xwayland/xwayland-present.c
> @@ -458,8 +458,8 @@ xwl_present_flip(WindowPtr present_window,
>      xwl_window->present_window = present_window;
>  
>      buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap,
> -                                             present_box->x2 - present_box->x1,
> -                                             present_box->y2 - present_box->y1,
> +                                             pixmap->drawable.width,
> +                                             pixmap->drawable.height,
>                                               &buffer_created);
>  
>      event->event_id = event_id;
> 

Please remove the present_box local, it's unused now. With that,

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list