present: Move present_wnmd.c contents to hw/xwayland/xwayland-present.c

This will allow eliminating indirections and making the Xwayland Present
code more efficient and easier to follow.

While this technically changes the Xorg video driver ABI, I don't know
of any drivers using the dropped present_wnmd_* symbols, and I doubt a
Xorg driver could make use of them as is anyway.

(As a bonus, Xorg no longer links any Xwayland specific Present code)

v2:
* Wrap DestroyWindow before initializing Present, so that
  present_destroy_window runs before xwl_present_cleanup. Avoids crash
  due to present_destroy_window calling xwl_present_* functions when
  xwl_present_window was already freed. (Olivier Fourdan)

Acked-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
Michel Dänzer
2021-04-21 12:50:02 +02:00
committed by Michel Dänzer
parent c35a716b02
commit b6419359b6
9 changed files with 732 additions and 786 deletions

View File

@@ -42,10 +42,6 @@ present_get_window_priv(WindowPtr window, Bool create)
xorg_list_init(&window_priv->vblank);
xorg_list_init(&window_priv->notifies);
xorg_list_init(&window_priv->exec_queue);
xorg_list_init(&window_priv->flip_queue);
xorg_list_init(&window_priv->idle_queue);
window_priv->window = window;
window_priv->crtc = PresentCrtcNeverSet;
dixSetPrivate(&window->devPrivates, &present_window_private_key, window_priv);