intel: Drop intelWindowMoved()

Everything this functions does under DRI2 is also taken care of
by intel_draw_buffer(), which is always called where intelWindowMoved()
is called.
This commit is contained in:
Kristian Høgsberg
2010-01-01 21:37:41 -05:00
parent 5203b7227c
commit 5bc4b886e4
2 changed files with 0 additions and 81 deletions

View File

@@ -412,7 +412,6 @@ intel_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
old_viewport = ctx->Driver.Viewport;
ctx->Driver.Viewport = NULL;
intel->driDrawable = driContext->driDrawablePriv;
intelWindowMoved(intel);
intel_draw_buffer(ctx, intel->ctx.DrawBuffer);
ctx->Driver.Viewport = old_viewport;
}
@@ -929,7 +928,6 @@ intelMakeCurrent(__DRIcontext * driContextPriv,
}
}
intel->driDrawable = driDrawPriv;
intelWindowMoved(intel);
}
intel_draw_buffer(&intel->ctx, &intel_fb->Base);

View File

@@ -79,82 +79,3 @@ intelFixupVblank(struct intel_context *intel, __DRIdrawable *dPriv)
return dPriv->vblFlags & ~VBLANK_FLAG_SECONDARY;
}
}
/**
* This will be called whenever the currently bound window is moved/resized.
* XXX: actually, it seems to NOT be called when the window is only moved (BP).
*/
void
intelWindowMoved(struct intel_context *intel)
{
GLcontext *ctx = &intel->ctx;
__DRIdrawable *dPriv = intel->driDrawable;
struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
if (!intel->intelScreen->driScrnPriv->dri2.enabled &&
intel->intelScreen->driScrnPriv->ddx_version.minor >= 7) {
GLuint flags = intelFixupVblank(intel, dPriv);
/* Check to see if we changed pipes */
if (flags != dPriv->vblFlags && dPriv->vblFlags &&
!(dPriv->vblFlags & VBLANK_FLAG_NO_IRQ)) {
int64_t count;
drmVBlank vbl;
int i;
/*
* Deal with page flipping
*/
vbl.request.type = DRM_VBLANK_ABSOLUTE;
if ( dPriv->vblFlags & VBLANK_FLAG_SECONDARY ) {
vbl.request.type |= DRM_VBLANK_SECONDARY;
}
for (i = 0; i < 2; i++) {
if (!intel_fb->color_rb[i] ||
(intel_fb->vbl_waited - intel_fb->color_rb[i]->vbl_pending) <=
(1<<23))
continue;
vbl.request.sequence = intel_fb->color_rb[i]->vbl_pending;
drmWaitVBlank(intel->driFd, &vbl);
}
/*
* Update msc_base from old pipe
*/
driDrawableGetMSC32(dPriv->driScreenPriv, dPriv, &count);
dPriv->msc_base = count;
/*
* Then get new vblank_base and vblSeq values
*/
dPriv->vblFlags = flags;
driGetCurrentVBlank(dPriv);
dPriv->vblank_base = dPriv->vblSeq;
intel_fb->vbl_waited = dPriv->vblSeq;
for (i = 0; i < 2; i++) {
if (intel_fb->color_rb[i])
intel_fb->color_rb[i]->vbl_pending = intel_fb->vbl_waited;
}
}
} else {
dPriv->vblFlags &= ~VBLANK_FLAG_SECONDARY;
}
/* Update Mesa's notion of window size */
driUpdateFramebufferSize(ctx, dPriv);
intel_fb->Base.Initialized = GL_TRUE; /* XXX remove someday */
/* Update hardware scissor */
if (ctx->Driver.Scissor != NULL) {
ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y,
ctx->Scissor.Width, ctx->Scissor.Height);
}
/* Re-calculate viewport related state */
if (ctx->Driver.DepthRange != NULL)
ctx->Driver.DepthRange( ctx, ctx->Viewport.Near, ctx->Viewport.Far );
}