![]() |
1.11 |
Manages one of more buffers that make up a Screen. More...
#include <screen.h>

Public Types | |
| using | DamageArray = std::vector< Rect > |
| Type used for damage arrays. | |
Public Member Functions | |
| Screen () noexcept | |
| Screen (const Screen &)=default | |
| Screen (Screen &&) noexcept=default | |
| virtual | ~Screen () noexcept=default |
| void | async_flip (bool async) |
| Set if asynchronous buffer flips are used. | |
| EGT_NODISCARD Rect | box () const |
| Bounding box for the screen. | |
| virtual EGT_NODISCARD size_t | brightness () const |
| Get the current brightness of the screen. | |
| virtual void | brightness (size_t brightness) |
| Set the brightness of the screen. | |
| virtual void | flip (const DamageArray &damage) |
| Perform a flip of the buffers. | |
| EGT_NODISCARD PixelFormat | format () const |
| Get the format of the screen. | |
| virtual EGT_NODISCARD bool | have_planes () const |
| Returns true if the screen supports planes. | |
| virtual void | high_fidelity () |
| Configure high fidelity options. | |
| virtual uint32_t | index () |
| If the screen implementation manages multiple buffers, this will return the index of the current buffer. | |
| virtual EGT_NODISCARD bool | is_composer () const |
| Returns true if this is a screen used with the Microchip Graphic Composer. | |
| virtual void | low_fidelity () |
| Configure low fidelity options. | |
| virtual EGT_NODISCARD size_t | max_brightness () const |
| Get the max brightness of the screen. | |
| Screen & | operator= (const Screen &)=default |
| Screen & | operator= (Screen &&) noexcept=default |
| EGT_NODISCARD Painter & | painter () |
| Get the painter for the screen. | |
| virtual void | schedule_flip ()=0 |
| Schedule a flip to occur later. | |
| EGT_NODISCARD Size | size () const |
| Size of the screen. | |
Static Public Member Functions | |
| static void | damage_algorithm (Screen::DamageArray &damage, Rect rect) |
| This function implements the algorithm for adding damage rectangles to a list. | |
Protected Types | |
| using | BufferArray = std::vector< ScreenBuffer > |
| Type used for an array of ScreenBuffer objects. | |
Protected Member Functions | |
| virtual void | copy_to_buffer (ScreenBuffer &buffer) |
| Copy the framebuffer to the current composition buffer. | |
| void | copy_to_buffer_software (ScreenBuffer &buffer) |
| Copy the framebuffer to the current composition buffer. | |
| void | init (const detail::FrameBufferInfo *info, uint32_t count, const Size &size, PixelFormat format=PixelFormat::argb8888) |
| void | init (const Size &size, PixelFormat format=PixelFormat::argb8888) |
Protected Attributes | |
| bool | m_async {false} |
| Perform flips asynchronously if supported. | |
| BufferArray | m_buffers |
| Screen buffer array. | |
| PixelFormat | m_format {} |
| Format of the screen. | |
| std::unique_ptr< Painter > | m_painter |
| Composition painter. | |
| Size | m_size |
| Size of the screen. | |
| Surface | m_surface |
| Composition surface. | |
Manages one of more buffers that make up a Screen.
|
protected |
Type used for an array of ScreenBuffer objects.
| using DamageArray = std::vector<Rect> |
Type used for damage arrays.
|
noexcept |
|
virtualdefaultnoexcept |
|
inline |
Set if asynchronous buffer flips are used.
|
inline |
Bounding box for the screen.
|
virtual |
Get the current brightness of the screen.
Reimplemented in KMSScreen.
|
virtual |
Set the brightness of the screen.
| brightness | Value from 0 to max_brightness(). |
Reimplemented in KMSScreen.
|
protectedvirtual |
Copy the framebuffer to the current composition buffer.
Reimplemented in X11Screen.
|
protected |
Copy the framebuffer to the current composition buffer.
|
static |
This function implements the algorithm for adding damage rectangles to a list.
| [in,out] | damage | The starting and ending damage array. |
| [in] | rect | The new rectangle to add. |
|
virtual |
Perform a flip of the buffers.
This iterates the buffers and puts the composition buffer into the screen buffers.
|
inline |
Get the format of the screen.
|
inlinevirtual |
Returns true if the screen supports planes.
Reimplemented in KMSScreen.
|
virtual |
Configure high fidelity options.
This configures settings related to font hinting, font aliasing, and shape aliasing.
|
inlinevirtual |
If the screen implementation manages multiple buffers, this will return the index of the current buffer.
Reimplemented in KMSOverlay, and KMSScreen.
|
protected |
| info | Array of detail::FrameBufferInfos. |
| count | Size of info array. Zero is allowed. |
| size | Size of the framebuffers. They must all be the same. |
| format | Format of the framebuffers. |
|
inlineprotected |
|
inlinevirtual |
Returns true if this is a screen used with the Microchip Graphic Composer.
Reimplemented in ComposerScreen.
|
virtual |
Configure low fidelity options.
This configures settings related to font hinting, font aliasing, and shape aliasing.
|
virtual |
Get the max brightness of the screen.
Reimplemented in KMSScreen.
|
inline |
Get the painter for the screen.
|
pure virtual |
Schedule a flip to occur later.
This is needed if a flip should occur sometime in the future to the hardware.
Implemented in ComposerScreen, KMSOverlay, KMSScreen, MemoryScreen, SDLScreen, and X11Screen.
|
inline |
Size of the screen.
|
protected |
Perform flips asynchronously if supported.
|
protected |
Screen buffer array.
|
protected |
Format of the screen.
|
protected |
Composition painter.
|
protected |
Size of the screen.
|
protected |
Composition surface.