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);
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);
95 void setup(
const DRMHelper& drm);
96 void setup(
int drm_fd);
114 EGLContext shared_context);
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 release_current() const
void auth_magic(drm_magic_t magic)
std::unique_ptr< gbm_surface, std::function< void(gbm_surface *)> > GBMSurfaceUPtr
Definition: display_helpers.h:46
Definition: display_helpers.h:57
void setup(const DRMHelper &drm)
EGLHelper & operator=(const EGLHelper &)=delete
DRMHelper & operator=(const DRMHelper &)=delete
void setup(std::shared_ptr< mir::udev::Context > const &udev)
GBMHelper()
Definition: display_helpers.h:89
unsigned int width
Definition: black_arrow.c:4
Interface for customizing aspects of the GL config used by the server.
Definition: gl_config.h:30
void report_egl_configuration(std::function< void(EGLDisplay, EGLConfig)>)
DRMHelper(DRMNodeToUse const node_to_use)
Definition: display_helpers.h:60
Definition: display_helpers.h:86
Definition: display_helpers.h:102
mir::Fd authenticated_fd()
DRMNodeToUse const node_to_use
Definition: display_helpers.h:74
int fd
Definition: display_helpers.h:73
bool make_current() const
void setup(GBMHelper const &gbm)
unsigned int height
Definition: black_arrow.c:5
GBMSurfaceUPtr create_scanout_surface(uint32_t width, uint32_t height)
EGLContext context()
Definition: display_helpers.h:120
Definition: drm_authentication.h:31
gbm_device * device
Definition: display_helpers.h:99
EGLHelper(GLConfig const &gl_config)
GBMHelper & operator=(const GBMHelper &)=delete
DRMNodeToUse
Definition: display_helpers.h:51