summaryrefslogtreecommitdiff
path: root/hw/xwayland
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@jrtc27.com>2022-12-05 18:47:17 +0000
committerOlivier Fourdan <fourdan@gmail.com>2023-06-06 07:19:12 +0000
commit42d2d9c1d4b1c8ac36d07d8383f2c8f864bb57fa (patch)
tree38c8eb1dbdd2a88b9827245bc7d7812a5fbf2d3c /hw/xwayland
parent85a36146681a0229d8547ee250644dc285e225da (diff)
xwayland: Pass vblank pointer itself to xwl_present_flip
All these arguments other than damage come from the vblank itself so passing the vblank simplifies the caller. Moreover, we pass the event_id solely so we can get back to the event, which is just the (extended) vblank, so passing the vblank avoids that round trip. Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Diffstat (limited to 'hw/xwayland')
-rw-r--r--hw/xwayland/xwayland-present.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
index 67af35b6d..78b7af2af 100644
--- a/hw/xwayland/xwayland-present.c
+++ b/hw/xwayland/xwayland-present.c
@@ -738,18 +738,15 @@ xwl_present_clear_window_flip(WindowPtr window)
}
static Bool
-xwl_present_flip(WindowPtr present_window,
- RRCrtcPtr crtc,
- uint64_t event_id,
- PixmapPtr pixmap,
- Bool sync_flip,
- RegionPtr damage)
+xwl_present_flip(present_vblank_ptr vblank, RegionPtr damage)
{
+ WindowPtr present_window = vblank->window;
+ PixmapPtr pixmap = vblank->pixmap;
struct xwl_window *xwl_window = xwl_window_from_window(present_window);
struct xwl_present_window *xwl_present_window = xwl_present_window_priv(present_window);
BoxPtr damage_box;
struct wl_buffer *buffer;
- struct xwl_present_event *event = xwl_present_event_from_id(event_id);
+ struct xwl_present_event *event = xwl_present_event_from_vblank(vblank);
if (!xwl_window)
return FALSE;
@@ -787,7 +784,7 @@ xwl_present_flip(WindowPtr present_window,
wl_surface_commit(xwl_window->surface);
- if (!sync_flip) {
+ if (!vblank->sync_flip) {
xwl_present_window->sync_callback =
wl_display_sync(xwl_window->xwl_screen->display);
wl_callback_add_listener(xwl_present_window->sync_callback,
@@ -851,8 +848,7 @@ xwl_present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
} else
damage = RegionDuplicate(&window->clipList);
- if (xwl_present_flip(vblank->window, vblank->crtc, vblank->event_id,
- vblank->pixmap, vblank->sync_flip, damage)) {
+ if (xwl_present_flip(vblank, damage)) {
WindowPtr toplvl_window = xwl_present_toplvl_pixmap_window(vblank->window);
PixmapPtr old_pixmap = screen->GetWindowPixmap(window);