コード例 #1
0
ファイル: dri2_glx.c プロジェクト: CPFDSoftware-Tony/gmv
static int64_t
dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
                int64_t remainder)
{
    __GLXDRIdrawablePrivate *priv = (__GLXDRIdrawablePrivate *) pdraw;
    __GLXdisplayPrivate *dpyPriv = __glXInitialize(priv->base.psc->dpy);
    __GLXDRIdisplayPrivate *pdp =
        (__GLXDRIdisplayPrivate *)dpyPriv->dri2Display;
    int64_t ret;

#ifdef __DRI2_FLUSH
    if (pdraw->psc->f)
        (*pdraw->psc->f->flush)(pdraw->driDrawable);
#endif

    /* Old servers don't send invalidate events */
    if (!pdp->invalidateAvailable)
        dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable);

    /* Old servers can't handle swapbuffers */
    if (!pdp->swapAvailable) {
        dri2CopySubBuffer(pdraw, 0, 0, priv->width, priv->height);
        return 0;
    }

#ifdef X_DRI2SwapBuffers
    DRI2SwapBuffers(pdraw->psc->dpy, pdraw->xDrawable, target_msc, divisor,
                    remainder, &ret);
#endif

    return ret;
}
コード例 #2
0
ファイル: dri2_glx.c プロジェクト: emcmanus/FlashMesa3D
static void
dri2SwapBuffers(__GLXDRIdrawable * pdraw)
{
   __GLXDRIdrawablePrivate *priv = (__GLXDRIdrawablePrivate *) pdraw;

   dri2CopySubBuffer(pdraw, 0, 0, priv->width, priv->height);
}