diff options
author | Chia-I Wu <[email protected]> | 2010-06-04 12:05:37 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-06-04 12:12:50 +0800 |
commit | 22c2e57cbb0fd5ed6856a7350672fa01c02b00ca (patch) | |
tree | 6b43a33760acc1e5abf906550c6700b76c918095 /src/gallium/state_trackers/egl/gdi | |
parent | 27910c42a9769a63855db06035c9874dd2ef5da0 (diff) |
st/egl: Move sw screen creation to native helper.
The code is shared by ximage and gdi backend.
Diffstat (limited to 'src/gallium/state_trackers/egl/gdi')
-rw-r--r-- | src/gallium/state_trackers/egl/gdi/native_gdi.c | 41 |
1 files changed, 10 insertions, 31 deletions
diff --git a/src/gallium/state_trackers/egl/gdi/native_gdi.c b/src/gallium/state_trackers/egl/gdi/native_gdi.c index 29e89bcae80..1791d198d50 100644 --- a/src/gallium/state_trackers/egl/gdi/native_gdi.c +++ b/src/gallium/state_trackers/egl/gdi/native_gdi.c @@ -32,9 +32,6 @@ #include "util/u_memory.h" #include "util/u_format.h" #include "util/u_inlines.h" -#include "target-helpers/wrap_screen.h" -#include "llvmpipe/lp_public.h" -#include "softpipe/sp_public.h" #include "gdi/gdi_sw_winsys.h" #include "common/native_helper.h" @@ -369,32 +366,6 @@ gdi_create_display(HDC hDC, struct pipe_screen *screen, return &gdpy->base; } -static struct pipe_screen * -gdi_create_screen(void) -{ - struct sw_winsys *winsys; - struct pipe_screen *screen = NULL; - - winsys = gdi_create_sw_winsys(); - if (!winsys) - return NULL; - -#if defined(GALLIUM_LLVMPIPE) - if (!screen && !debug_get_bool_option("GALLIUM_NO_LLVM", FALSE)) - screen = llvmpipe_create_screen(winsys); -#endif - if (!screen) - screen = softpipe_create_screen(winsys); - - if (!screen) { - if (winsys->destroy) - winsys->destroy(winsys); - return NULL; - } - - return gallium_wrap_screen(screen); -} - struct native_probe * native_create_probe(EGLNativeDisplayType dpy) { @@ -417,11 +388,19 @@ struct native_display * native_create_display(EGLNativeDisplayType dpy, struct native_event_handler *event_handler) { + struct sw_winsys *winsys; struct pipe_screen *screen; - screen = gdi_create_screen(); - if (!screen) + winsys = gdi_create_sw_winsys(); + if (!winsys) + return NULL; + + screen = native_create_sw_screen(winsys); + if (!screen) { + if (winsys->destroy) + winsys->destroy(winsys); return NULL; + } return gdi_create_display((HDC) dpy, screen, event_handler); } |