pass __DRIdrawablePrivate to intelWindowMoved(), rather than context ptr

This commit is contained in:
Brian
2007-11-03 10:35:39 -06:00
parent cb62b64e33
commit 02a1c8f569
3 changed files with 7 additions and 14 deletions
@@ -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
@@ -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);
}
@@ -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 */