summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-05 10:01:51 -0700
committerBrian <[email protected]>2007-11-05 10:01:51 -0700
commit81c1993daa57ef0fc1fc6993aa832f3b4005154b (patch)
tree360010b6fee45956c72d9d0792a0cc45bec29d79 /src/mesa/drivers/dri
parent74866737db739bef8b7593d5060e4f80d91ff33a (diff)
rewrite/simplify intelSwapBuffers()
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
index 0d5ceec1e5c..bc1ad04395f 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
@@ -231,25 +231,18 @@ intelUpdateWindowSize(__DRIdrawablePrivate *dPriv)
void
intelSwapBuffers(__DRIdrawablePrivate * dPriv)
{
- if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
- GET_CURRENT_CONTEXT(ctx);
-
- if (ctx == NULL)
- return;
+ struct intel_framebuffer *intel_fb = intel_framebuffer(dPriv);
+ struct pipe_surface *back_surf;
- if (ctx->Visual.doubleBufferMode) {
- struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
- struct pipe_surface *back_surf
- = st_get_framebuffer_surface(intel_fb->stfb, ST_SURFACE_BACK_LEFT);
+ assert(intel_fb);
+ assert(intel_fb->stfb);
- _mesa_notifySwapBuffers(ctx); /* flush pending rendering comands */
+ st_notify_swapbuffers(intel_fb->stfb);
- intelDisplaySurface(dPriv, back_surf, NULL);
- }
- }
- else {
- /* XXX this shouldn't be an error but we can't handle it for now */
- fprintf(stderr, "%s: drawable has no context!\n", __FUNCTION__);
+ back_surf = st_get_framebuffer_surface(intel_fb->stfb,
+ ST_SURFACE_BACK_LEFT);
+ if (back_surf) {
+ intelDisplaySurface(dPriv, back_surf, NULL);
}
}