Advertisement
mtx512

compositor-fbdev.c

Mar 5th, 2014
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  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);
  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) {
  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[],
  41. weston_log("could not load gl renderer\n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement