return ret;
}
-/**
- * Flush the current context if it is bound to the framebuffer.
- */
-void
-stw_flush_current_locked( struct stw_framebuffer *fb )
-{
- struct stw_context *ctx = stw_current_context();
-
- if (ctx && ctx->current_framebuffer == fb) {
- ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL);
- }
-}
/**
* Notify the current context that the framebuffer has become invalid.
BOOL stw_make_current( HDC hdc, DHGLRC dhglrc );
-void stw_flush_current_locked( struct stw_framebuffer *fb );
void stw_notify_current_locked( struct stw_framebuffer *fb );
#endif /* STW_CONTEXT_H */
return TRUE;
}
- /* Display the HUD */
ctx = stw_current_context();
- if (ctx && ctx->hud) {
- struct pipe_resource *back =
- stw_get_framebuffer_resource(fb->stfb, ST_ATTACHMENT_BACK_LEFT);
- hud_draw(ctx->hud, back);
- }
+ if (ctx) {
+ if (ctx->hud) {
+ /* Display the HUD */
+ struct pipe_resource *back =
+ stw_get_framebuffer_resource(fb->stfb, ST_ATTACHMENT_BACK_LEFT);
+ hud_draw(ctx->hud, back);
+ }
- stw_flush_current_locked(fb);
+ if (ctx->current_framebuffer == fb) {
+ /* flush current context */
+ ctx->st->flush(ctx->st, ST_FLUSH_END_OF_FRAME, NULL);
+ }
+ }
return stw_st_swap_framebuffer_locked(hdc, fb->stfb);
}