summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-03 10:26:19 -0600
committerBrian <[email protected]>2007-11-05 08:04:48 -0700
commitcb62b64e33278f599fca62d928433f6b6989317e (patch)
tree9ad8ca1c09b312c1b40d9f63fffa4d42b0e64f2a /src/mesa/drivers/dri
parented8774e920706acb3445471833709dcaa691cb0c (diff)
simplify the window moved/resized code a bit
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_context.c12
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c3
2 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.c b/src/mesa/drivers/dri/intel_winsys/intel_context.c
index 8cc285276ae..2b581a6b0f9 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_context.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_context.c
@@ -221,11 +221,13 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
st_make_current(intel->st, draw_fb, read_fb);
+#if 0
/* update size of Mesa framebuffer(s) to match window */
st_resize_framebuffer(draw_fb, driDrawPriv->w, driDrawPriv->h);
if (driReadPriv != driDrawPriv) {
st_resize_framebuffer(read_fb, driReadPriv->w, driReadPriv->h);
}
+#endif
if ((intel->driDrawable != driDrawPriv) ||
(intel->lastStamp != driDrawPriv->lastStamp)) {
@@ -233,6 +235,16 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
intelWindowMoved(intel);
intel->lastStamp = driDrawPriv->lastStamp;
}
+
+#if 1
+ /* The size of the draw buffer will have been updated above.
+ * If the readbuffer is a different window, check/update its size now.
+ */
+ if (driReadPriv != driDrawPriv) {
+ st_resize_framebuffer(read_fb, driReadPriv->w, driReadPriv->h);
+ }
+#endif
+
}
else {
st_make_current(NULL, NULL, NULL);
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
index 387e3bc72e6..5d04815da85 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
@@ -243,13 +243,10 @@ void
intelWindowMoved(struct intel_context *intel)
{
__DRIdrawablePrivate *dPriv = intel->driDrawable;
- struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
struct st_framebuffer *stfb
= (struct st_framebuffer *) dPriv->driverPrivate;
st_resize_framebuffer(stfb, dPriv->w, dPriv->h);
-
- intel_fb->Base.Initialized = GL_TRUE; /* XXX remove someday */
}