summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/fbdev
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/fbdev')
-rw-r--r--src/mesa/drivers/fbdev/glfbdev.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/mesa/drivers/fbdev/glfbdev.c b/src/mesa/drivers/fbdev/glfbdev.c
index 3a6b452065b..bd9d3ac0ad9 100644
--- a/src/mesa/drivers/fbdev/glfbdev.c
+++ b/src/mesa/drivers/fbdev/glfbdev.c
@@ -157,11 +157,27 @@ get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
}
+/**
+ * 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;
+
+ buffer = ctx->WinSysDrawBuffer;
+ get_buffer_size( buffer, &newWidth, &newHeight );
+ if (buffer->Width != newWidth || buffer->Height != newHeight) {
+ _mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight );
+ }
+
+ buffer = ctx->WinSysReadBuffer;
+ get_buffer_size( buffer, &newWidth, &newHeight );
+ if (buffer->Width != newWidth || buffer->Height != newHeight) {
+ _mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight );
+ }
}