19 #ifndef MIR_GRAPHICS_MESA_DISPLAY_BUFFER_H_
20 #define MIR_GRAPHICS_MESA_DISPLAY_BUFFER_H_
53 std::shared_ptr<DisplayReport>
const& listener,
54 std::vector<std::shared_ptr<KMSOutput>>
const& outputs,
59 EGLContext shared_context);
81 BufferObject* get_front_buffer_object();
82 BufferObject* get_buffer_object(
struct gbm_bo *bo);
83 bool schedule_page_flip(BufferObject* bufobj);
84 void set_crtc(BufferObject
const*);
86 BufferObject* visible_composite_frame;
87 BufferObject* scheduled_composite_frame;
88 std::shared_ptr<graphics::Buffer> visible_bypass_frame, scheduled_bypass_frame;
89 std::shared_ptr<Buffer> bypass_buf{
nullptr};
90 BufferObject* bypass_bufobj{
nullptr};
91 std::shared_ptr<Platform>
const platform;
92 std::shared_ptr<DisplayReport>
const listener;
95 std::vector<std::shared_ptr<KMSOutput>> outputs;
99 uint32_t fb_width, fb_height;
101 std::atomic<bool> needs_set_crtc;
102 std::chrono::milliseconds recommend_sleep{0};
103 bool page_flips_pending;
All things Mir.
Definition: atomic_callback.h:25
Interface to an output framebuffer.
Definition: display_buffer.h:47
geometry::Rectangle view_area() const override
The area the DisplayBuffer occupies in the virtual screen space.
void post() override
Post the content of the DisplayBuffers associated with this DisplaySyncGroup.
std::unique_ptr< gbm_surface, std::function< void(gbm_surface *)> > GBMSurfaceUPtr
Definition: display_helpers.h:46
Definition: display_helpers.h:57
void set_orientation(MirOrientation const rot, geometry::Rectangle const &a)
DisplaySyncGroup represents a group of displays that need to be output in unison as a single post() c...
Definition: display.h:54
void make_current() override
Makes the the current GL render target.
Interface for customizing aspects of the GL config used by the server.
Definition: gl_config.h:30
bool post_renderables_if_optimizable(RenderableList const &renderlist) override
This will render renderlist to the screen and post the result to the screen if there is a hardware op...
Definition: display_buffer.h:35
Definition: display_helpers.h:102
MirOrientation orientation() const override
Returns the orientation of the display buffer relative to how the user should see it (the orientation...
void swap_buffers() override
Swap buffers for OpenGL rendering.
Definition: render_target.h:29
void for_each_display_buffer(std::function< void(graphics::DisplayBuffer &)> const &f) override
std::vector< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:79
Definition: rectangle.h:33
NativeDisplayBuffer * native_display_buffer() override
Returns a pointer to the native display buffer object backing this display buffer.
std::chrono::milliseconds recommended_sleep() const override
Returns a recommendation to the compositor as to how long it should wait before sampling the scene fo...
Definition: display_buffer.h:46
void release_current() override
Releases the current GL render target.
void wait_for_page_flip()