diff options
author | Dave Airlie <airlied@redhat.com> | 2009-04-09 10:14:35 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-04-09 10:31:08 +1000 |
commit | d1a9b1f513109c975a5a7ed5a2d0c329b280afe4 (patch) | |
tree | 5c85af47b4f5af0661acf129e3ce3f59e43cbfd9 /src/glx/x11/dri2_glx.c | |
parent | 90ffce497395d8c02fee2ea4ee4c025eede3d876 (diff) | |
parent | 8648c2685870174cf620ef15de70ef030a8d5a20 (diff) |
Merge remote branch 'origin/master' into radeon-rewrite
Conflicts:
src/mesa/drivers/dri/r200/r200_tex.c
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_swtcl.c
src/mesa/drivers/dri/r300/r300_tex.c
src/mesa/drivers/dri/r300/r300_texmem.c
src/mesa/drivers/dri/r300/r300_texstate.c
src/mesa/drivers/dri/radeon/radeon_tex.c
Diffstat (limited to 'src/glx/x11/dri2_glx.c')
-rw-r--r-- | src/glx/x11/dri2_glx.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c index 0ef5d3ab56..9c8f1101b9 100644 --- a/src/glx/x11/dri2_glx.c +++ b/src/glx/x11/dri2_glx.c @@ -60,9 +60,6 @@ struct __GLXDRIdisplayPrivateRec { int driMajor; int driMinor; int driPatch; - - unsigned long configureSeqno; - Bool (*oldConfigProc)(Display *, XEvent *, xEvent *); }; struct __GLXDRIcontextPrivateRec { @@ -76,7 +73,6 @@ struct __GLXDRIdrawablePrivateRec { __DRIbuffer buffers[5]; int bufferCount; int width, height; - unsigned long configureSeqno; int have_back; int have_front; int have_fake_front; @@ -174,7 +170,6 @@ static __GLXDRIdrawable *dri2CreateDrawable(__GLXscreenConfigs *psc, pdraw->base.drawable = drawable; pdraw->base.psc = psc; pdraw->bufferCount = 0; - pdraw->configureSeqno = ~0; DRI2CreateDrawable(psc->dpy, xDrawable); @@ -293,30 +288,9 @@ dri2GetBuffers(__DRIdrawable *driDrawable, int *out_count, void *loaderPrivate) { __GLXDRIdrawablePrivate *pdraw = loaderPrivate; - __GLXdisplayPrivate *dpyPriv = __glXInitialize(pdraw->base.psc->dpy); - __GLXDRIdisplayPrivate *pdp = (__GLXDRIdisplayPrivate *)dpyPriv->dri2Display; DRI2Buffer *buffers; int i; - /** - * Check if a ConfigureNotify has come in since we last asked for the - * buffers associated with this drawable. If not, we can assume that they're - * the same set at glViewport time, and save a synchronous round-trip to the - * X Server. - */ - if (pdraw->configureSeqno == pdp->configureSeqno && - count == pdraw->bufferCount) { - for (i = 0; i < count; i++) { - if (pdraw->buffers[i].attachment != attachments[i]) - break; - } - if (i == count) { - *out_count = pdraw->bufferCount; - return pdraw->buffers; - } - } - pdraw->configureSeqno = pdp->configureSeqno; - buffers = DRI2GetBuffers(pdraw->base.psc->dpy, pdraw->base.xDrawable, width, height, attachments, count, out_count); if (buffers == NULL) @@ -468,28 +442,6 @@ static void dri2DestroyDisplay(__GLXDRIdisplay *dpy) Xfree(dpy); } -/** - * Makes a note on receiving ConfigureNotify that we need to re-check the - * DRI2 buffers, as window sizes may have resulted in reallocation. - */ -static Bool dri2ConfigureNotifyProc(Display *dpy, XEvent *re, xEvent *event) -{ - __GLXdisplayPrivate *dpyPriv = __glXInitialize(dpy); - __GLXDRIdisplayPrivate *pdp; - Bool ret; - - /* We should always be able to find our pdp, as it only gets torn down - * when the Display is torn down. - */ - pdp = (__GLXDRIdisplayPrivate *)dpyPriv->dri2Display; - - ret = pdp->oldConfigProc(dpy, re, event); - - pdp->configureSeqno = re->xconfigure.serial; - - return ret; -} - /* * Allocate, initialize and return a __DRIdisplayPrivate object. * This is called from __glXInitialize() when we are given a new @@ -512,11 +464,7 @@ _X_HIDDEN __GLXDRIdisplay *dri2CreateDisplay(Display *dpy) return NULL; } - pdp->oldConfigProc = XESetWireToEvent(dpy, ConfigureNotify, - dri2ConfigureNotifyProc); - pdp->driPatch = 0; - pdp->configureSeqno = 0; pdp->base.destroyDisplay = dri2DestroyDisplay; pdp->base.createScreen = dri2CreateScreen; |