static void gdi_present(struct pipe_screen *screen, struct pipe_resource *res, HDC hDC) { /* This will fail if any interposing layer (trace, debug, etc) has * been introduced between the state-trackers and the pipe driver. * * Ideally this would get replaced with a call to * pipe_screen::flush_frontbuffer(). * * Failing that, it may be necessary for intervening layers to wrap * other structs such as this stw_winsys as well... */ struct sw_winsys *winsys = NULL; struct sw_displaytarget *dt = NULL; #ifdef HAVE_LLVMPIPE if (use_llvmpipe) { winsys = llvmpipe_screen(screen)->winsys; dt = llvmpipe_resource(res)->dt; gdi_sw_display(winsys, dt, hDC); return; } #endif winsys = softpipe_screen(screen)->winsys, dt = softpipe_resource(res)->dt, gdi_sw_display(winsys, dt, hDC); }
static void gdi_sw_displaytarget_display(struct sw_winsys *winsys, struct sw_displaytarget *dt, void *context_private) { /* nasty: */ HDC hDC = (HDC)context_private; gdi_sw_display(winsys, dt, hDC); }
static void gdi_softpipe_present(struct pipe_screen *screen, struct pipe_surface *surface, HDC hDC) { /* This will fail if any interposing layer (trace, debug, etc) has * been introduced between the state-trackers and softpipe. * * Ideally this would get replaced with a call to * pipe_screen::flush_frontbuffer(). * * Failing that, it may be necessary for intervening layers to wrap * other structs such as this stw_winsys as well... */ gdi_sw_display(softpipe_screen(screen)->winsys, softpipe_resource(surface->texture)->dt, hDC); }