diff options
author | Chia-I Wu <[email protected]> | 2010-06-29 14:58:33 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-06-29 17:16:20 +0800 |
commit | d5ab243d5a5bacbd2ba615d40f13c8ab37364745 (patch) | |
tree | bbf3c92d3c512e0d12eab3a7036c60c8e2cf7171 /src/gallium/state_trackers/egl/fbdev | |
parent | d8e0e114567ec19fd59f974080a418dc959cc9b6 (diff) |
st/egl: Move module loading code to targets.
Several changes are made. libegl.a no longer defines _eglMain. It
defines functions to create and destroy a _EGLDriver instead. The
creation function is called by the targets. It takes an egl_g3d_loader
as its argument. The loader is defined by the targets and is in charge
of creating st_api and pipe_screen. This allows us to move the module
loading code to targets. Lastly, the modules are now loaded as the
respective contexts are created.
Diffstat (limited to 'src/gallium/state_trackers/egl/fbdev')
-rw-r--r-- | src/gallium/state_trackers/egl/fbdev/native_fbdev.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c index c0bc7b2462d..7c276c22f8c 100644 --- a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c +++ b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c @@ -386,8 +386,10 @@ fbdev_display_init(struct native_display *ndpy) return FALSE; ws = fbdev_create_sw_winsys(fbdpy->fd, fbdpy->config.color_format); - if (ws) - fbdpy->base.screen = native_create_sw_screen(ws); + if (ws) { + fbdpy->base.screen = + fbdpy->event_handler->new_sw_screen(&fbdpy->base, ws); + } if (fbdpy->base.screen) { if (!fbdpy->base.screen->is_format_supported(fbdpy->base.screen, @@ -402,7 +404,8 @@ fbdev_display_init(struct native_display *ndpy) } static struct native_display * -fbdev_display_create(int fd, struct native_event_handler *event_handler) +fbdev_display_create(int fd, struct native_event_handler *event_handler, + void *user_data) { struct fbdev_display *fbdpy; @@ -412,6 +415,7 @@ fbdev_display_create(int fd, struct native_event_handler *event_handler) fbdpy->fd = fd; fbdpy->event_handler = event_handler; + fbdpy->base.user_data = user_data; if (!fbdev_display_init(&fbdpy->base)) { FREE(fbdpy); @@ -428,7 +432,8 @@ fbdev_display_create(int fd, struct native_event_handler *event_handler) } static struct native_display * -native_create_display(void *dpy, struct native_event_handler *event_handler) +native_create_display(void *dpy, struct native_event_handler *event_handler, + void *user_data) { struct native_display *ndpy; int fd; @@ -443,7 +448,7 @@ native_create_display(void *dpy, struct native_event_handler *event_handler) if (fd < 0) return NULL; - ndpy = fbdev_display_create(fd, event_handler); + ndpy = fbdev_display_create(fd, event_handler, user_data); if (!ndpy) close(fd); |