(struct dri2_display *)dpyPriv->dri2Display;
CARD64 ret = 0;
+ /* Old servers can't handle swapbuffers */
+ if (!pdp->swapAvailable) {
+ dri2CopySubBuffer(pdraw, 0, 0, priv->width, priv->height);
+ } else {
+#ifdef X_DRI2SwapBuffers
#ifdef __DRI2_FLUSH
if (psc->f) {
struct glx_context *gc = __glXGetCurrentContext();
}
#endif
+ DRI2SwapBuffers(psc->base.dpy, pdraw->xDrawable,
+ target_msc, divisor, remainder, &ret);
+#endif
+ }
+
/* Old servers don't send invalidate events */
if (!pdp->invalidateAvailable)
dri2InvalidateBuffers(dpyPriv->dpy, pdraw->xDrawable);
- /* Old servers can't handle swapbuffers */
- if (!pdp->swapAvailable) {
- dri2CopySubBuffer(pdraw, 0, 0, priv->width, priv->height);
- return 0;
- }
-
-#ifdef X_DRI2SwapBuffers
- DRI2SwapBuffers(psc->base.dpy, pdraw->xDrawable, target_msc, divisor,
- remainder, &ret);
-#endif
-
return ret;
}