summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-11-03 10:35:39 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-11-05 08:04:48 -0700
commit02a1c8f5690a82dc77db7af381d1b6e4aea67e29 (patch)
tree474ad2e3946272cc9ba4450d776791da2f46ddef
parentcb62b64e33278f599fca62d928433f6b6989317e (diff)
pass __DRIdrawablePrivate to intelWindowMoved(), rather than context ptr
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_context.c4
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c14
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h3
3 files changed, 7 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.c b/src/mesa/drivers/dri/intel_winsys/intel_context.c
index 2b581a6b0f..443276cfc0 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_context.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_context.c
@@ -232,7 +232,7 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
if ((intel->driDrawable != driDrawPriv) ||
(intel->lastStamp != driDrawPriv->lastStamp)) {
intel->driDrawable = driDrawPriv;
- intelWindowMoved(intel);
+ intelWindowMoved(driDrawPriv);
intel->lastStamp = driDrawPriv->lastStamp;
}
@@ -241,7 +241,7 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
* If the readbuffer is a different window, check/update its size now.
*/
if (driReadPriv != driDrawPriv) {
- st_resize_framebuffer(read_fb, driReadPriv->w, driReadPriv->h);
+ intelWindowMoved(driReadPriv);
}
#endif
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
index 5d04815da8..2db3a29db2 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
@@ -222,16 +222,10 @@ intelDisplaySurface(__DRIdrawablePrivate * dPriv,
UNLOCK_HARDWARE(intel);
- /* XXX this is bogus. The context here may not even be bound to this drawable! */
if (intel->lastStamp != dPriv->lastStamp) {
- GET_CURRENT_CONTEXT(currctx);
- struct intel_context *intelcurrent = intel_context(currctx);
- if (intelcurrent == intel && intelcurrent->driDrawable == dPriv) {
- intelWindowMoved(intel);
- intel->lastStamp = dPriv->lastStamp;
- }
+ intelWindowMoved(dPriv);
+ intel->lastStamp = dPriv->lastStamp;
}
-
}
@@ -240,12 +234,10 @@ intelDisplaySurface(__DRIdrawablePrivate * dPriv,
* This will be called whenever the currently bound window is moved/resized.
*/
void
-intelWindowMoved(struct intel_context *intel)
+intelWindowMoved(__DRIdrawablePrivate *dPriv)
{
- __DRIdrawablePrivate *dPriv = intel->driDrawable;
struct st_framebuffer *stfb
= (struct st_framebuffer *) dPriv->driverPrivate;
-
st_resize_framebuffer(stfb, dPriv->w, dPriv->h);
}
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h
index 8d77ffce85..7bea6e6d40 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h
+++ b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h
@@ -46,6 +46,7 @@ extern void intelDisplaySurface(__DRIdrawablePrivate * dPriv,
extern void intelSwapBuffers(__DRIdrawablePrivate * dPriv);
-extern void intelWindowMoved(struct intel_context *intel);
+extern void intelWindowMoved(__DRIdrawablePrivate *dPriv);
+
#endif /* INTEL_BUFFERS_H */