[PATCH xserver] present/wnmd: Preserve window pixmap's screen_x/y on flip
Olivier Fourdan
ofourdan at redhat.com
Fri Jun 8 06:06:11 UTC 2018
Hi Michel,
On Thu, Jun 7, 2018 at 6:27 PM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> The incorrect values could result in the new pixmap's contents
> getting corrupted down the line.
>
> Bugzilla: https://bugs.freedesktop.org/106841
> Fixes: 029608dd8020 "present: Add window flip mode"
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
> present/present_wnmd.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/present/present_wnmd.c b/present/present_wnmd.c
> index 80ffb014e..1e3958bfc 100644
> --- a/present/present_wnmd.c
> +++ b/present/present_wnmd.c
> @@ -469,6 +469,8 @@ present_wnmd_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
> PixmapPtr old_pixmap = screen->GetWindowPixmap(window);
>
> /* Replace window pixmap with flip pixmap */
> + vblank->pixmap->screen_x = old_pixmap->screen_x;
> + vblank->pixmap->screen_y = old_pixmap->screen_y;
> present_set_tree_pixmap(toplvl_window, old_pixmap, vblank->pixmap);
> vblank->pixmap->refcnt++;
> dixDestroyPixmap(old_pixmap, old_pixmap->drawable.id);
> --
> 2.17.1
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
Yeap, works for me! That one was starting to give me headaches...
Tested-by: Olivier Fourdan <ofourdan at redhat.com>
Thanks
Olivier
More information about the xorg-devel
mailing list