common.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef TESTER_COMMON_H
  2. #define TESTER_COMMON_H
  3. #define FB_BUFFER_NUM 3
  4. struct output {
  5. struct wl_output *output;
  6. struct wl_list link;
  7. };
  8. struct example_window {
  9. struct wl_display *wl_display;
  10. char *drm_node;
  11. int drm_dev_fd;
  12. int width;
  13. int height;
  14. struct fb_buffer ms_buffers[FB_BUFFER_NUM];
  15. char *raw_file;
  16. FILE *raw_fp;
  17. struct shm_buffer ss_buffer;
  18. int x;
  19. int y;
  20. struct wl_registry *wl_registry;
  21. struct wl_compositor *wl_compositor;
  22. struct wl_subcompositor *wl_subcompositor;
  23. struct xdg_wm_base *xdg_wm_base;
  24. struct wl_surface *wl_surface;
  25. struct wl_surface *wl_subsurface;
  26. struct wl_subsurface *subsurface;
  27. struct xdg_surface *xdg_surface;
  28. struct xdg_toplevel *xdg_toplevel;
  29. struct zwp_linux_dmabuf_v1 *dmabuf;
  30. struct wl_callback *callback;
  31. bool wait_for_configure;
  32. bool initialized;
  33. uint32_t frames_num;
  34. uint32_t benchmark_time;
  35. bool show_bar;
  36. bool sync;
  37. bool noread;
  38. bool ss_usedma;
  39. struct wl_list output_list;
  40. struct zxdg_output_manager_v1 *xdg_output_manager;
  41. };
  42. int init_window(struct example_window *window);
  43. #endif