Move buffer creation and buffer details into drm.c and shm.c

This commit is contained in:
Kristian Høgsberg 2011-01-14 16:20:21 -05:00
parent e4762a6ac1
commit 8525a50362
7 changed files with 118 additions and 91 deletions

View file

@ -676,6 +676,11 @@ x11_compositor_create(struct wl_display *display, int width, int height)
if (x11_compositor_init_egl(c) < 0)
return NULL;
c->base.destroy = x11_destroy;
c->base.authenticate = x11_authenticate;
c->base.present = x11_compositor_present;
c->base.create_buffer = wlsc_drm_buffer_create;
/* Can't init base class until we have a current egl context */
if (wlsc_compositor_init(&c->base, display) < 0)
return NULL;
@ -693,9 +698,5 @@ x11_compositor_create(struct wl_display *display, int width, int height)
WL_EVENT_READABLE,
x11_compositor_handle_event, c);
c->base.destroy = x11_destroy;
c->base.authenticate = x11_authenticate;
c->base.present = x11_compositor_present;
return &c->base;
}