intel: Drop intelWindowMoved()
authorKristian Høgsberg <krh@bitplanet.net>
Sat, 2 Jan 2010 02:37:41 +0000 (21:37 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 4 Jan 2010 16:48:02 +0000 (11:48 -0500)
Everything this functions does under DRI2 is also taken care of
by intel_draw_buffer(), which is always called where intelWindowMoved()
is called.

src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_swapbuffers.c

index f03d1141da53802fbcdc6dcff322b652bea45bd8..4a17711cfe6882f8d6df17621e8740753a88d9a3 100644 (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);
index 9f563e7c1dc0581153153810e3149aa45227f9b7..65441495a79655fc41190853babbb6f5d4e859df 100644 (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 );
-}