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/directfb | |
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/directfb')
-rw-r--r-- | src/mesa/drivers/directfb/idirectfbgl_mesa.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mesa/drivers/directfb/idirectfbgl_mesa.c b/src/mesa/drivers/directfb/idirectfbgl_mesa.c index d11241b2b2..3c2a77b5bc 100644 --- a/src/mesa/drivers/directfb/idirectfbgl_mesa.c +++ b/src/mesa/drivers/directfb/idirectfbgl_mesa.c @@ -214,7 +214,8 @@ IDirectFBGL_Mesa_Lock( IDirectFBGL *thiz ) if (data->width != width || data->height != height) { data->width = width; data->height = height; - _mesa_ResizeBuffersMESA(); + _mesa_resize_framebuffer(&data->context, + &data->framebuffer, width, height); } data->locked = DFB_TRUE; @@ -355,10 +356,19 @@ dfbGetBufferSize( GLframebuffer *buffer, GLuint *width, GLuint *height ) *height = (GLuint) data->height; } +/** + * We only implement this function as a mechanism to check if the + * framebuffer size has changed (and update corresponding state). + */ static void dfbSetViewport( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h ) { - _mesa_ResizeBuffersMESA(); + GLuint newWidth, newHeight; + GLframebuffer *buffer = ctx->WinSysDrawBuffer; + dfbGetBufferSize( buffer, &newWidth, &newHeight ); + if (buffer->Width != newWidth || buffer->Height != newHeight) { + _mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight ); + } } static void |