~ubuntu-branches/ubuntu/quantal/mesa/quantal

« back to all changes in this revision

Viewing changes to src/mesa/drivers/ggi/ggimesa.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-02-21 12:44:07 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20070221124407-rgcacs32mycrtadl
ImportĀ upstreamĀ versionĀ 6.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
257
257
        printf("returning %d, %d\n", *width, *height);
258
258
}
259
259
 
 
260
/**
 
261
 * We only implement this function as a mechanism to check if the
 
262
 * framebuffer size has changed (and update corresponding state).
 
263
 */
260
264
static void gl_ggiViewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
261
265
{
262
 
   /* poll for window size change and realloc software Z/stencil/etc if needed */
263
 
   _mesa_ResizeBuffersMESA();
 
266
   GLuint newWidth, newHeight;
 
267
   GLframebuffer *buffer = ctx->WinSysDrawBuffer;
 
268
   gl_ggiGetSize( buffer, &newWidth, &newHeight );
 
269
   if (buffer->Width != newWidth || buffer->Height != newHeight) {
 
270
      _mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight );
 
271
   }
264
272
}
265
273
 
266
274
 
305
313
        ggi_ctx->clearcolor = col;
306
314
}
307
315
 
308
 
static void gl_ggiClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
309
 
                        GLint x, GLint y, GLint width, GLint height)
 
316
static void gl_ggiClear(GLcontext *ctx, GLbitfield mask)
310
317
{
311
318
        ggi_mesa_context_t ggi_ctx = (ggi_mesa_context_t)ctx->DriverCtx;
 
319
        int x = ctx->DrawBuffer->_Xmin;
 
320
        int y = ctx->DrawBuffer->_Ymin;
 
321
        int w = ctx->DrawBuffer->_Xmax - x;
 
322
        int h = ctx->DrawBuffer->_Ymax - y;
 
323
        GLboolean all = (w == ctx->DrawBuffer->Width && h == ctx->DrawBuffer->height)
312
324
        
313
325
        GGIMESADPRINT_CORE("gl_ggiClear() called\n");
314
326
 
328
340
 
329
341
                mask &= ~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT);
330
342
        }
331
 
        _swrast_Clear(ctx, mask, all, x, y, width, height);
 
343
        _swrast_Clear(ctx, mask);
332
344
        
333
345
}
334
346