15#include <egt/detail/meta.h>
16#include <egt/geometry.h>
64 virtual
void schedule_flip() = 0;
70 virtual uint32_t index() {
return 0; }
75 EGT_NODISCARD
Size size()
const {
return m_size; }
173 void init(
void** ptr, uint32_t count, const
Size& size,
179 init(
nullptr, 0, size, format);
185 explicit ScreenBuffer(cairo_surface_t* s) noexcept
198 void add_damage(
const Rect& rect)
200 Screen::damage_algorithm(damage, rect);
Manages one of more buffers that make up a Screen.
Definition screen.h:34
void copy_to_buffer_software(ScreenBuffer &buffer)
Copy the framebuffer to the current composition buffer.
virtual ~Screen() noexcept=default
EGT_NODISCARD Rect box() const
Bounding box for the screen.
Definition screen.h:80
void async_flip(bool async)
Set if asynchronous buffer flips are used.
Definition screen.h:103
virtual void low_fidelity()
Configure low fidelity options.
virtual void brightness(size_t brightness)
Set the brightness of the screen.
virtual EGT_NODISCARD bool is_composer() const
Returns true if this is a screen used with the Microchip Graphic Composer.
Definition screen.h:161
virtual void high_fidelity()
Configure high fidelity options.
virtual EGT_NODISCARD size_t brightness() const
Get the current brightness of the screen.
shared_cairo_t m_cr
Composition surface context.
Definition screen.h:214
std::vector< Rect > DamageArray
Type used for damage arrays.
Definition screen.h:40
BufferArray m_buffers
Screen buffer array.
Definition screen.h:220
virtual void copy_to_buffer(ScreenBuffer &buffer)
Copy the framebuffer to the current composition buffer.
virtual EGT_NODISCARD size_t max_brightness() const
Get the max brightness of the screen.
EGT_NODISCARD Size size() const
Size of the screen.
Definition screen.h:75
virtual EGT_NODISCARD bool have_planes() const
Returns true if the screen supports planes.
Definition screen.h:155
Size m_size
Size of the screen.
Definition screen.h:223
EGT_NODISCARD PixelFormat format() const
Get the format of the screen.
Definition screen.h:150
EGT_NODISCARD shared_cairo_t context() const
Get the context for the screen.
Definition screen.h:87
static void damage_algorithm(Screen::DamageArray &damage, Rect rect)
This function implements the algorithm for adding damage rectangles to a list.
std::vector< ScreenBuffer > BufferArray
Type used for an array of ScreenBuffer objects.
Definition screen.h:217
shared_cairo_surface_t m_surface
Composition surface.
Definition screen.h:211
std::shared_ptr< cairo_surface_t > shared_cairo_surface_t
Shared pointer for a cairo surface.
Definition types.h:29
std::shared_ptr< cairo_t > shared_cairo_t
Shared pointer for a cairo context.
Definition types.h:35
std::unique_ptr< cairo_surface_t, detail::cairo_surface_t_deleter > unique_cairo_surface_t
Unique pointer for a cairo surface.
Definition types.h:80
PixelFormat
Supported pixel formats.
Definition types.h:94
EGT framework namespace.
Definition animation.h:24