SHOW:
|
|
- or go back to the newest paste.
| 1 | diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c | |
| 2 | index 0d96269..aa01ac2 100644 | |
| 3 | --- a/src/compositor-fbdev.c | |
| 4 | +++ b/src/compositor-fbdev.c | |
| 5 | @@ -53,6 +53,7 @@ struct fbdev_compositor {
| |
| 6 | struct udev_input input; | |
| 7 | int use_pixman; | |
| 8 | struct wl_listener session_listener; | |
| 9 | + NativeDisplayType display; | |
| 10 | }; | |
| 11 | ||
| 12 | struct fbdev_screeninfo {
| |
| 13 | @@ -87,6 +88,7 @@ struct fbdev_output {
| |
| 14 | pixman_image_t *shadow_surface; | |
| 15 | void *shadow_buf; | |
| 16 | uint8_t depth; | |
| 17 | + NativeWindowType window; | |
| 18 | }; | |
| 19 | ||
| 20 | struct fbdev_parameters {
| |
| 21 | @@ -626,9 +628,17 @@ fbdev_output_create(struct fbdev_compositor *compositor, | |
| 22 | if (pixman_renderer_output_create(&output->base) < 0) | |
| 23 | goto out_shadow_surface; | |
| 24 | } else {
| |
| 25 | - | + output->window = fbCreateWindow(compositor->display, -1, -1, 0, 0); |
| 25 | + | + output->window = fbCreateWindow(compositor->display, -1, -1, 0, |
| 26 | + if (output->window == NULL) {
| |
| 27 | + fprintf(stderr, "failed to create window\n"); | |
| 28 | + return 0; | |
| 29 | + } | |
| 30 | + | |
| 31 | + | |
| 32 | setenv("HYBRIS_EGLPLATFORM", "wayland", 1);
| |
| 33 | if (gl_renderer->output_create(&output->base, | |
| 34 | - (EGLNativeWindowType)NULL) < 0) {
| |
| 35 | +// (EGLNativeWindowType)NULL) < 0) {
| |
| 36 | - | + (EGLNativeWindowType)output->window) < 0) {
|
| 36 | + | + (EGLNativeWindowType)output->window) < 0 |
| 37 | weston_log("gl_renderer_output_create failed.\n");
| |
| 38 | goto out_shadow_surface; | |
| 39 | } | |
| 40 | - | @@ -920,8 +930,13 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[], |
| 40 | + | @@ -920,8 +930,13 @@ fbdev_compositor_create(struct wl_display *display, int *ar |
| 41 | - | weston_log("could not load gl renderer\n"); |
| 41 | + | weston_log("could not load gl renderer\n");
|
| 42 | goto out_launcher; | |
| 43 | } | |
| 44 | - | |
| 45 | - if (gl_renderer->create(&compositor->base, EGL_DEFAULT_DISPLAY, | |
| 46 | + compositor->display = fbGetDisplay(compositor->base.wl_display); | |
| 47 | + if (compositor->display == NULL) {
| |
| 48 | + weston_log("fbGetDisplay failed.\n");
| |
| 49 | + goto out_launcher; | |
| 50 | + } | |
| 51 | + if (gl_renderer->create(&compositor->base, compositor->display, | |
| 52 | +// if (gl_renderer->create(&compositor->base, EGL_DEFAULT_DISPLAY, | |
| 53 | gl_renderer->opaque_attribs, | |
| 54 | NULL) < 0) {
| |
| 55 | weston_log("gl_renderer_create failed.\n");
| |
| 56 | (END) |