19 #ifndef MIR_GRAPHICS_MESA_DISPLAY_HELPERS_H_ 20 #define MIR_GRAPHICS_MESA_DISPLAY_HELPERS_H_ 29 #pragma GCC diagnostic push 30 #pragma GCC diagnostic warning "-Wall" 32 #pragma GCC diagnostic pop 35 #include <xf86drmMode.h> 46 typedef std::unique_ptr<gbm_surface,std::function<void(gbm_surface*)>>
GBMSurfaceUPtr;
66 void setup(std::shared_ptr<mir::udev::Context>
const& udev);
70 void drop_master()
const;
71 void set_master()
const;
79 int is_appropriate_device(std::shared_ptr<mir::udev::Context>
const& udev,
mir::udev::Device const& dev);
81 int count_connections(
int fd);
83 int open_drm_device(std::shared_ptr<mir::udev::Context>
const& udev);
96 void setup(
int drm_fd);
97 GBMSurfaceUPtr create_scanout_surface(uint32_t
width, uint32_t
height);
112 void setup(
GBMHelper const& gbm, EGLContext shared_context);
113 void setup(
GBMHelper const& gbm, gbm_surface* surface_gbm,
114 EGLContext shared_context);
118 bool release_current()
const;
122 void report_egl_configuration(std::function<
void(EGLDisplay, EGLConfig)>);
126 EGLint
const depth_buffer_bits;
127 EGLint
const stencil_buffer_bits;
128 EGLDisplay egl_display;
129 EGLConfig egl_config;
130 EGLContext egl_context;
131 EGLSurface egl_surface;
132 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:46
Definition: display_helpers.h:57
GBMHelper()
Definition: display_helpers.h:89
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:60
Definition: display_helpers.h:86
Definition: display_helpers.h:102
unsigned int width
Definition: touchspot_image.c:4
DRMNodeToUse const node_to_use
Definition: display_helpers.h:74
int fd
Definition: display_helpers.h:73
unsigned int height
Definition: touchspot_image.c:5
EGLContext context()
Definition: display_helpers.h:120
Definition: drm_authentication.h:31
gbm_device * device
Definition: display_helpers.h:99
DRMNodeToUse
Definition: display_helpers.h:51