diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2006-10-15 18:51:22 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2006-10-15 18:51:22 +0000 |
commit | a7a26503b67b8baa9df8b2bb194435d681559550 (patch) | |
tree | 03d9e3aea5ac66f3bfa9fd9239154b0d516daf79 /src/mesa/drivers/svga | |
parent | a391384bad9e960989dc8c793386081afc55592c (diff) |
Remove calls to _mesa_ResizeBuffersMESA() - generally replace with code to
check the current window size, then call _mesa_resize_framebuffer().
Diffstat (limited to 'src/mesa/drivers/svga')
-rw-r--r-- | src/mesa/drivers/svga/svgamesa.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mesa/drivers/svga/svgamesa.c b/src/mesa/drivers/svga/svgamesa.c index 09330e78ab..0dd9a144fe 100644 --- a/src/mesa/drivers/svga/svgamesa.c +++ b/src/mesa/drivers/svga/svgamesa.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa.c,v 1.26 2005/09/07 23:26:01 brianp Exp $ */ +/* $Id: svgamesa.c,v 1.27 2006/10/15 18:51:22 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -213,10 +213,18 @@ static void get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *heigh *height = SVGAMesa->height = vga_getydim(); } +/** + * We only implement this function as a mechanism to check if the + * framebuffer size has changed (and update corresponding state). + */ static void viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { - /* poll for window size change and realloc software Z/stencil/etc if needed */ - _mesa_ResizeBuffersMESA(); + GLuint newWidth, newHeight; + GLframebuffer *buffer = ctx->WinSysDrawBuffer; + get_buffer_size( buffer, &newWidth, &newHeight ); + if (buffer->Width != newWidth || buffer->Height != newHeight) { + _mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight ); + } } static void set_buffer( GLcontext *ctx, GLframebuffer *colorBuffer, |