diff options
Diffstat (limited to 'src/gallium/winsys/gdi/gdi_sw_winsys.c')
-rw-r--r-- | src/gallium/winsys/gdi/gdi_sw_winsys.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/gallium/winsys/gdi/gdi_sw_winsys.c b/src/gallium/winsys/gdi/gdi_sw_winsys.c index 00c6facd044..55f99c4f47d 100644 --- a/src/gallium/winsys/gdi/gdi_sw_winsys.c +++ b/src/gallium/winsys/gdi/gdi_sw_winsys.c @@ -43,7 +43,7 @@ #include "util/u_math.h" #include "util/u_memory.h" #include "state_tracker/sw_winsys.h" -#include "stw_winsys.h" +#include "gdi_sw_winsys.h" struct gdi_sw_displaytarget @@ -168,21 +168,29 @@ no_gdt: } +void +gdi_sw_display( struct sw_winsys *winsys, + struct sw_displaytarget *dt, + HDC hDC ) +{ + struct gdi_sw_displaytarget *gdt = gdi_sw_displaytarget(dt); + + StretchDIBits(hDC, + 0, 0, gdt->width, gdt->height, + 0, 0, gdt->width, gdt->height, + gdt->data, &gdt->bmi, 0, SRCCOPY); +} + static void gdi_sw_displaytarget_display(struct sw_winsys *winsys, struct sw_displaytarget *dt, void *context_private) { - struct gdi_softpipe_displaytarget *gdt = gdi_sw_displaytarget(dt); - /* nasty: */ HDC hDC = (HDC)context_private; - StretchDIBits(hDC, - 0, 0, gdt->width, gdt->height, - 0, 0, gdt->width, gdt->height, - gdt->data, &gdt->bmi, 0, SRCCOPY); + gdi_sw_display(winsys, dt, hDC); } |