mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-28 04:20:40 +02:00
added st_notify_swapbuffers()
This commit is contained in:
parent
9fc03fed01
commit
74866737db
2 changed files with 19 additions and 0 deletions
|
|
@ -132,3 +132,20 @@ st_get_framebuffer_surface(struct st_framebuffer *stfb, uint surfIndex)
|
|||
return strb->surface;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function is to be called prior to SwapBuffers on the given
|
||||
* framebuffer. It checks if the current context is bound to the framebuffer
|
||||
* and flushes rendering if needed.
|
||||
*/
|
||||
void
|
||||
st_notify_swapbuffers(struct st_framebuffer *stfb)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (ctx && ctx->DrawBuffer == &stfb->Base) {
|
||||
st_flush(ctx->st);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,4 +71,6 @@ void st_invalidate_state(GLcontext * ctx, GLuint new_state);
|
|||
|
||||
void st_flush( struct st_context *st );
|
||||
|
||||
void st_notify_swapbuffers(struct st_framebuffer *stfb);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue