19 #ifndef MIR_GRAPHICS_MESA_DISPLAY_BUFFER_H_
20 #define MIR_GRAPHICS_MESA_DISPLAY_BUFFER_H_
48 std::shared_ptr<DisplayReport>
const& listener,
49 std::vector<std::shared_ptr<KMSOutput>>
const& outputs,
54 EGLContext shared_context);
63 void post_update(std::shared_ptr<graphics::Buffer> bypass_buf)
override;
65 std::function<
void(
Renderable const&)>
const& render_fn);
71 BufferObject* get_front_buffer_object();
72 BufferObject* get_buffer_object(
struct gbm_bo *bo);
73 bool schedule_page_flip(BufferObject* bufobj);
75 BufferObject* last_flipped_bufobj;
76 BufferObject* scheduled_bufobj;
77 std::shared_ptr<graphics::Buffer> last_flipped_bypass_buf;
78 std::shared_ptr<Platform>
const platform;
79 std::shared_ptr<DisplayReport>
const listener;
82 std::vector<std::shared_ptr<KMSOutput>> outputs;
86 uint32_t fb_width, fb_height;
88 std::atomic<bool> needs_set_crtc;
89 bool page_flips_pending;
geometry::Rectangle view_area() const
The area the DisplayBuffer occupies in the virtual screen space.
Definition: display_buffer.cpp:183
Interface to an output framebuffer.
Definition: display_buffer.h:39
std::unique_ptr< gbm_surface, std::function< void(gbm_surface *)> > GBMSurfaceUPtr
Definition: display_helpers.h:45
Definition: display_helpers.h:50
void post_update()
This will trigger OpenGL rendering and post the result to the screen.
Definition: display_buffer.cpp:207
void release_current()
Releases the current GL rendering target.
Definition: display_buffer.cpp:390
bool can_bypass() const override
to be deprecated
Definition: display_buffer.cpp:188
Interface for customizing aspects of the GL config used by the server.
Definition: gl_config.h:30
std::list< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:88
Definition: renderable.h:33
Definition: display_helpers.h:94
MirOrientation orientation() const override
Returns the orientation of the display buffer relative to how the user should see it (the orientation...
Definition: display_buffer.cpp:194
~DisplayBuffer()
Definition: display_buffer.cpp:170
void make_current()
Makes the DisplayBuffer the current GL rendering target.
Definition: display_buffer.cpp:382
Definition: rectangle.h:33
void render_and_post_update(RenderableList const &renderlist, std::function< void(Renderable const &)> const &render_fn)
This will render renderlist to the screen and post the result to the screen.
Definition: display_buffer.cpp:200
Definition: display_buffer.h:44
void schedule_set_crtc()
Definition: display_buffer.cpp:395
void wait_for_page_flip()
Definition: display_buffer.cpp:371