diff options
author | Thomas Hellstrom <[email protected]> | 2017-06-20 19:24:34 +0200 |
---|---|---|
committer | Thomas Hellstrom <[email protected]> | 2017-08-03 08:01:31 +0200 |
commit | d5ba75f8881f0869dc16f71f7395514c0a35b6e2 (patch) | |
tree | 520888733122ce7526143898cdead1e5245a91bc /src/gallium/state_trackers/dri/dri_drawable.c | |
parent | 91c93dec980dbf7b253c124b85dc4e46d2a83587 (diff) |
st/dri2 Plumb the flush_swapbuffer functionality through to dri3
Implement the state tracker manager drawable interface flush_swapbuffer
method by plumbing it through to dri3 if available.
Signed-off-by: Thomas Hellstrom <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Sinclair Yeh <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_drawable.c')
-rw-r--r-- | src/gallium/state_trackers/dri/dri_drawable.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index 9e0dd6bcfb3..75a8197d330 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -123,6 +123,23 @@ dri_st_framebuffer_flush_front(struct st_context_iface *stctx, } /** + * The state tracker framebuffer interface flush_swapbuffers callback + */ +static boolean +dri_st_framebuffer_flush_swapbuffers(struct st_context_iface *stctx, + struct st_framebuffer_iface *stfbi) +{ + struct dri_context *ctx = (struct dri_context *)stctx->st_manager_private; + struct dri_drawable *drawable = + (struct dri_drawable *) stfbi->st_manager_private; + + if (drawable->flush_swapbuffers) + drawable->flush_swapbuffers(ctx, drawable); + + return TRUE; +} + +/** * This is called when we need to set up GL rendering to a new X window. */ boolean @@ -146,6 +163,7 @@ dri_create_buffer(__DRIscreen * sPriv, drawable->base.visual = &drawable->stvis; drawable->base.flush_front = dri_st_framebuffer_flush_front; drawable->base.validate = dri_st_framebuffer_validate; + drawable->base.flush_swapbuffers = dri_st_framebuffer_flush_swapbuffers; drawable->base.st_manager_private = (void *) drawable; drawable->screen = screen; |