diff options
author | Jesse Barnes <[email protected]> | 2009-11-10 13:28:01 -0800 |
---|---|---|
committer | Jesse Barnes <[email protected]> | 2010-01-08 12:33:32 -0500 |
commit | efc82e7c703f9160cfdbe6d97e166ca6f5e75d86 (patch) | |
tree | f0c5d65580be40ee818758b11276531dcb6142bd /src/glx/x11/dri2.c | |
parent | daf7fe69f7bd0caa955d30b43fc35b7ce0069b6b (diff) |
DRI2: add SwapInterval support
Add support for the DRI2SwapInterval protocol request. This allows
direct rendered clients to control their swap interval per the
SGI_swap_control extension.
Signed-off-by: Jesse Barnes <[email protected]>
Diffstat (limited to 'src/glx/x11/dri2.c')
-rw-r--r-- | src/glx/x11/dri2.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/glx/x11/dri2.c b/src/glx/x11/dri2.c index 922edbdcf52..9ce633c40d4 100644 --- a/src/glx/x11/dri2.c +++ b/src/glx/x11/dri2.c @@ -537,4 +537,21 @@ Bool DRI2WaitSBC(Display *dpy, XID drawable, CARD64 target_sbc, CARD64 *ust, return True; } +void DRI2SwapInterval(Display *dpy, XID drawable, int interval) +{ + XExtDisplayInfo *info = DRI2FindDisplay(dpy); + xDRI2SwapIntervalReq *req; + + XextSimpleCheckExtension (dpy, info, dri2ExtensionName); + + LockDisplay(dpy); + GetReq(DRI2SwapInterval, req); + req->reqType = info->codes->major_opcode; + req->dri2ReqType = X_DRI2SwapInterval; + req->drawable = drawable; + req->interval = interval; + UnlockDisplay(dpy); + SyncHandle(); +} + #endif /* GLX_DIRECT_RENDERING */ |