diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2005-09-14 00:36:27 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2005-09-14 00:36:27 +0000 |
commit | ff9d235042bb80daf0a6f5af41f7abcb1d552a80 (patch) | |
tree | 072f5e9684e019d3309b942ef7ee038fe027df4f /src/mesa/drivers/dri/fb/fb_dri.c | |
parent | 48799287b3e88105cdf3f83e97e8bb4a90f8650b (diff) | |
download | external_mesa3d-ff9d235042bb80daf0a6f5af41f7abcb1d552a80.zip external_mesa3d-ff9d235042bb80daf0a6f5af41f7abcb1d552a80.tar.gz external_mesa3d-ff9d235042bb80daf0a6f5af41f7abcb1d552a80.tar.bz2 |
Instead of calling _mesa_ResizeBuffersMESA() in the Viewport function,
call driUpdateFramebufferSize() when window size/position changes.
Diffstat (limited to 'src/mesa/drivers/dri/fb/fb_dri.c')
-rw-r--r-- | src/mesa/drivers/dri/fb/fb_dri.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/fb/fb_dri.c b/src/mesa/drivers/dri/fb/fb_dri.c index c1fab2d..ee25096 100644 --- a/src/mesa/drivers/dri/fb/fb_dri.c +++ b/src/mesa/drivers/dri/fb/fb_dri.c @@ -41,7 +41,7 @@ * that may not be valid everywhere. */ -#include "driver.h" +/*#include "driver.h"*/ #include "drm.h" #include "utils.h" #include "drirenderbuffer.h" @@ -114,9 +114,21 @@ get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height ) static void +updateFramebufferSize(GLcontext *ctx) +{ + fbContextPtr fbmesa = FB_CONTEXT(ctx); + struct gl_framebuffer *fb = ctx->WinSysDrawBuffer; + if (fbmesa->dri.drawable->w != fb->Width || + fbmesa->dri.drawable->h != fb->Height) { + driUpdateFramebufferSize(ctx, fbmesa->dri.drawable); + } +} + +static void viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { - _mesa_ResizeBuffersMESA(); + /* XXX this should be called after we acquire the DRI lock, not here */ + updateFramebufferSize(ctx); } |