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_egl.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_egl.c')
-rw-r--r-- | src/mesa/drivers/dri/fb/fb_egl.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/fb/fb_egl.c b/src/mesa/drivers/dri/fb/fb_egl.c index 94ff9cb..05148b4 100644 --- a/src/mesa/drivers/dri/fb/fb_egl.c +++ b/src/mesa/drivers/dri/fb/fb_egl.c @@ -399,9 +399,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); } |