14#include <egt/detail/meta.h>
15#include <egt/geometry.h>
16#include <egt/painter.h>
17#include <egt/surface.h>
69 virtual
void schedule_flip() = 0;
75 virtual uint32_t index() {
return 0; }
80 EGT_NODISCARD
Size size()
const {
return m_size; }
176 void init(const detail::FrameBufferInfo* info, uint32_t count, const
Size& size,
182 init(
nullptr, 0, size, format);
188 explicit ScreenBuffer(
Surface&& s) noexcept
189 : surface(std::move(s))
201 void add_damage(
const Rect& rect)
203 Screen::damage_algorithm(damage, rect);
Drawing interface for 2D graphics.
Definition painter.h:54
Manages one of more buffers that make up a Screen.
Definition screen.h:39
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:85
void async_flip(bool async)
Set if asynchronous buffer flips are used.
Definition screen.h:106
virtual void low_fidelity()
Configure low fidelity options.
std::unique_ptr< Painter > m_painter
Composition painter.
Definition screen.h:217
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:164
virtual void high_fidelity()
Configure high fidelity options.
virtual EGT_NODISCARD size_t brightness() const
Get the current brightness of the screen.
std::vector< Rect > DamageArray
Type used for damage arrays.
Definition screen.h:45
BufferArray m_buffers
Screen buffer array.
Definition screen.h:223
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:80
virtual EGT_NODISCARD bool have_planes() const
Returns true if the screen supports planes.
Definition screen.h:158
Size m_size
Size of the screen.
Definition screen.h:226
EGT_NODISCARD PixelFormat format() const
Get the format of the screen.
Definition screen.h:153
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:220
Surface m_surface
Composition surface.
Definition screen.h:214
EGT_NODISCARD Painter & painter()
Get the painter for the screen.
Definition screen.h:90
PixelFormat
Supported pixel formats.
Definition types.h:30
EGT framework namespace.
Definition animation.h:24