-
- if (mask)
- _swrast_Clear( ctx, mask, all, x, y, width, height );
-}
-
-
-/*
- * When we detect that the user has resized the window this function will
- * get called. Here we'll reallocate the back buffer, depth buffer,
- * stencil buffer etc. to match the new window size.
- * The buffer->Width and buffer->Height values will indicate the new size.
- */
-void
-xmesa_resize_buffers( GLframebuffer *buffer )
-{
- int height = (int) buffer->Height;
- /* We can do this cast because the first field in the XMesaBuffer
- * struct is a GLframebuffer struct. If this weren't true, we'd
- * need a pointer from the GLframebuffer to the XMesaBuffer.
- */
- XMesaBuffer xmBuffer = (XMesaBuffer) buffer;
-
- xmesa_alloc_back_buffer( xmBuffer );
-
- /* Needed by FLIP macro */
- xmBuffer->bottom = height - 1;
-
- if (xmBuffer->backimage) {
- /* Needed by PIXELADDR1 macro */
- xmBuffer->ximage_width1 = xmBuffer->backimage->bytes_per_line;
- xmBuffer->ximage_origin1 = (GLubyte *) xmBuffer->backimage->data
- + xmBuffer->ximage_width1 * (height-1);
-
- /* Needed by PIXELADDR2 macro */
- xmBuffer->ximage_width2 = xmBuffer->backimage->bytes_per_line / 2;
- xmBuffer->ximage_origin2 = (GLushort *) xmBuffer->backimage->data
- + xmBuffer->ximage_width2 * (height-1);
-
- /* Needed by PIXELADDR3 macro */
- xmBuffer->ximage_width3 = xmBuffer->backimage->bytes_per_line;
- xmBuffer->ximage_origin3 = (GLubyte *) xmBuffer->backimage->data
- + xmBuffer->ximage_width3 * (height-1);
-
- /* Needed by PIXELADDR4 macro */
- xmBuffer->ximage_width4 = xmBuffer->backimage->width;
- xmBuffer->ximage_origin4 = (GLuint *) xmBuffer->backimage->data
- + xmBuffer->ximage_width4 * (height-1);
- }
-
- _swrast_alloc_buffers( buffer );