mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-10 23:33:46 +00:00
dri2: Send out event when auxillary buffers are invalidated
This lets the DRI2 clients rely on the server to notify them when they need to get new buffers. Without this, OpenGL clients poll the server in glViewport() which can be a performance problems and also isn't completely correct behaviour. We bump the DRI2 protocol minor to indicate the availability of the event, which the DRI2 clients can use to avoid polling. This speeds up various piglit and oglc test cases as well as real applications. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
f281db9a5e
commit
421606a8ef
5 changed files with 106 additions and 11 deletions
|
|
@ -152,6 +152,10 @@ typedef int (*DRI2ScheduleWaitMSCProcPtr)(ClientPtr client,
|
|||
CARD64 target_msc,
|
||||
CARD64 divisor,
|
||||
CARD64 remainder);
|
||||
|
||||
typedef void (*DRI2InvalidateProcPtr)(DrawablePtr pDraw,
|
||||
void *data);
|
||||
|
||||
/**
|
||||
* Version of the DRI2InfoRec structure defined in this header
|
||||
*/
|
||||
|
|
@ -199,7 +203,10 @@ extern _X_EXPORT Bool DRI2Connect(ScreenPtr pScreen,
|
|||
extern _X_EXPORT Bool DRI2Authenticate(ScreenPtr pScreen, drm_magic_t magic);
|
||||
|
||||
extern _X_EXPORT int DRI2CreateDrawable(ClientPtr client,
|
||||
DrawablePtr pDraw, XID id);
|
||||
DrawablePtr pDraw,
|
||||
XID id,
|
||||
DRI2InvalidateProcPtr invalidate,
|
||||
void *priv);
|
||||
|
||||
extern _X_EXPORT void DRI2DestroyDrawable(DrawablePtr pDraw);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue