19 #ifndef MIR_GRAPHICS_MESA_DISPLAY_HELPERS_H_ 20 #define MIR_GRAPHICS_MESA_DISPLAY_HELPERS_H_ 28 #pragma GCC diagnostic push 29 #pragma GCC diagnostic warning "-Wall" 31 #pragma GCC diagnostic pop 34 #include <xf86drmMode.h> 45 typedef std::unique_ptr<gbm_surface,std::function<void(gbm_surface*)>>
GBMSurfaceUPtr;
65 void setup(std::shared_ptr<mir::udev::Context>
const& udev);
69 void drop_master()
const;
70 void set_master()
const;
78 int is_appropriate_device(std::shared_ptr<mir::udev::Context>
const& udev,
mir::udev::Device const& dev);
80 int count_connections(
int fd);
82 int open_drm_device(std::shared_ptr<mir::udev::Context>
const& udev);
95 void setup(
int drm_fd);
96 GBMSurfaceUPtr create_scanout_surface(uint32_t
width, uint32_t
height);
111 void setup(
GBMHelper const& gbm, EGLContext shared_context);
112 void setup(
GBMHelper const& gbm, gbm_surface* surface_gbm,
113 EGLContext shared_context);
117 bool release_current()
const;
121 void report_egl_configuration(std::function<
void(EGLDisplay, EGLConfig)>);
125 EGLint
const depth_buffer_bits;
126 EGLint
const stencil_buffer_bits;
127 EGLDisplay egl_display;
128 EGLConfig egl_config;
129 EGLContext egl_context;
130 EGLSurface egl_surface;
131 bool should_terminate_egl;
All things Mir.
Definition: atomic_callback.h:25
bool make_current(mrg::RenderTarget *render_target)
Definition: server_example_adorning_compositor.cpp:39
std::unique_ptr< gbm_surface, std::function< void(gbm_surface *)> > GBMSurfaceUPtr
Definition: display_helpers.h:45
Definition: display_helpers.h:56
GBMHelper()
Definition: display_helpers.h:88
Interface for customizing aspects of the GL config used by the server.
Definition: gl_config.h:30
DRMHelper(DRMNodeToUse const node_to_use)
Definition: display_helpers.h:59
Definition: display_helpers.h:85
Definition: display_helpers.h:101
unsigned int width
Definition: touchspot_image.c:4
DRMNodeToUse const node_to_use
Definition: display_helpers.h:73
int fd
Definition: display_helpers.h:72
unsigned int height
Definition: touchspot_image.c:5
EGLContext context()
Definition: display_helpers.h:119
Definition: drm_authentication.h:31
gbm_device * device
Definition: display_helpers.h:98
DRMNodeToUse
Definition: display_helpers.h:50