present: Send GLX_BufferSwapComplete events from present extension

This allows GL to support the GLX_INTEL_swap_event extension.

v2: Return GLX_BLIT_COMPLETE_INTEL for unknown swap types

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Keith Packard
2013-11-21 22:48:31 -08:00
parent cde86e68fc
commit 3dd5bfe540
7 changed files with 107 additions and 25 deletions

View File

@@ -137,6 +137,14 @@ present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw,
}
}
static present_complete_notify_proc complete_notify;
void
present_register_complete_notify(present_complete_notify_proc proc)
{
complete_notify = proc;
}
void
present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 serial, uint64_t ust, uint64_t msc)
{
@@ -165,6 +173,8 @@ present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 se
}
}
}
if (complete_notify)
(*complete_notify)(window, mode, serial, ust, msc);
}
void