diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2010-01-15 17:45:52 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2010-01-15 18:12:20 +0800 |
commit | b2c7b08299fc4701648207bc9d90676e147475b9 (patch) | |
tree | 3c943898f83a09c82b5754877b800ec9ab26a7ef /src/gallium/state_trackers/egl_g3d/common/egl_g3d.c | |
parent | 51b00574a2ef81629548b079ef70c016bdd4251d (diff) |
st/egl_g3d: Hook to update_buffer of the pipe screen.
It is a notification from the client APIs that the surface size might
have changed.
Diffstat (limited to 'src/gallium/state_trackers/egl_g3d/common/egl_g3d.c')
-rw-r--r-- | src/gallium/state_trackers/egl_g3d/common/egl_g3d.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/egl_g3d/common/egl_g3d.c b/src/gallium/state_trackers/egl_g3d/common/egl_g3d.c index 7da9300c20..d0c9755d5e 100644 --- a/src/gallium/state_trackers/egl_g3d/common/egl_g3d.c +++ b/src/gallium/state_trackers/egl_g3d/common/egl_g3d.c @@ -469,6 +469,22 @@ egl_g3d_flush_frontbuffer(struct pipe_screen *screen, } } +/** + * Re-validate the context. + */ +static void +egl_g3d_update_buffer(struct pipe_screen *screen, void *context_private) +{ + struct egl_g3d_context *gctx = egl_g3d_context(context_private); + + /** + * It is likely that the surface has changed when this function is called. + * Set force_validate to skip an unnecessary check. + */ + gctx->force_validate = EGL_TRUE; + egl_g3d_validate_context(gctx->base.Display, &gctx->base); +} + static EGLBoolean egl_g3d_terminate(_EGLDriver *drv, _EGLDisplay *dpy) { @@ -517,6 +533,7 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy, } gdpy->native->screen->flush_frontbuffer = egl_g3d_flush_frontbuffer; + gdpy->native->screen->update_buffer = egl_g3d_update_buffer; dpy->ClientAPIsMask = gdrv->api_mask; |