1.10 |
Screen in a KMS dumb buffer inside of an overlay plane. More...
#include <kmsoverlay.h>
Public Member Functions | |
KMSOverlay ()=delete | |
KMSOverlay (const Size &size, PixelFormat format, WindowHint hint) | |
virtual void | apply () |
Apply any pending changes to the hardware. | |
virtual int | gem () |
Get the associated GEM handle for the overlay plane. | |
virtual uint32_t | get_plane_format () |
Get internal DRM plane format. | |
virtual void | hide () |
Hide the plane from the display. | |
virtual float | hscale () const |
Get the horizontal scale value. | |
uint32_t | index () override |
If the screen implementation manages multiple buffers, this will return the index of the current buffer. | |
virtual void | pan_pos (const Point &point) |
Set the hardware pan position in the plane buffer. | |
virtual void | pan_size (const Size &size) |
Set the hardware pan size. | |
virtual void | position (const DisplayPoint &point) |
Move the hardware plane to the specified position. | |
void * | raw () |
Get a raw pointer to the current framebuffer. | |
virtual void | resize (const Size &size) |
Resize the hardware plane. | |
virtual void | rotate (uint32_t degrees) |
Rotate the hardware plane. | |
plane_data * | s () const |
Get a pointer to the internal plane structure. | |
virtual void | scale (float hscale, float vscale) |
Change the hardware scale of the overlay plane. | |
void | schedule_flip () override |
Schedule a flip to occur later. | |
virtual void | show () |
Show the plane on the display. | |
virtual float | vscale () const |
Get the vertical scale value. | |
Public Member Functions inherited from Screen | |
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. | |
EGT_NODISCARD shared_cairo_t | context () const |
Get the context for 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 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 Size | size () const |
Size of the screen. | |
Protected Attributes | |
uint32_t | m_index {0} |
Current flip index. | |
unique_plane_t | m_plane |
Plane instance pointer. | |
std::unique_ptr< FlipThread > | m_pool |
Internal thread pool for flipping. | |
Protected Attributes inherited from Screen | |
bool | m_async {false} |
Perform flips asynchronously if supported. | |
BufferArray | m_buffers |
Screen buffer array. | |
shared_cairo_t | m_cr |
Composition surface context. | |
PixelFormat | m_format {} |
Format of the screen. | |
Size | m_size |
Size of the screen. | |
shared_cairo_surface_t | m_surface |
Composition surface. | |
Additional Inherited Members | |
Public Types inherited from Screen | |
using | DamageArray = std::vector< Rect > |
Type used for damage arrays. | |
Static Public Member Functions inherited from Screen | |
static void | damage_algorithm (Screen::DamageArray &damage, Rect rect) |
This function implements the algorithm for adding damage rectangles to a list. | |
Protected Types inherited from Screen | |
using | BufferArray = std::vector< ScreenBuffer > |
Type used for an array of ScreenBuffer objects. | |
Protected Member Functions inherited from Screen | |
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 Size &size, PixelFormat format=PixelFormat::argb8888) |
void | init (void **ptr, uint32_t count, const Size &size, PixelFormat format=PixelFormat::argb8888) |
Screen in a KMS dumb buffer inside of an overlay plane.
This uses libplanes to modeset and configure planes.
|
delete |
KMSOverlay | ( | const Size & | size, |
PixelFormat | format, | ||
WindowHint | hint | ||
) |
size | Size of the scree. |
format | Requested format for the screen. |
hint | Hint for the type of plane to create. |
|
virtual |
Apply any pending changes to the hardware.
|
virtual |
Get the associated GEM handle for the overlay plane.
|
virtual |
Get internal DRM plane format.
|
virtual |
Hide the plane from the display.
|
virtual |
Get the horizontal scale value.
|
overridevirtual |
If the screen implementation manages multiple buffers, this will return the index of the current buffer.
Reimplemented from Screen.
|
virtual |
Set the hardware pan position in the plane buffer.
|
virtual |
Set the hardware pan size.
|
virtual |
Move the hardware plane to the specified position.
void * raw | ( | ) |
Get a raw pointer to the current framebuffer.
|
virtual |
Resize the hardware plane.
|
virtual |
Rotate the hardware plane.
|
inline |
Get a pointer to the internal plane structure.
|
virtual |
Change the hardware scale of the overlay plane.
[in] | hscale | Horizontal scale, with 1.0 being 100%. |
[in] | vscale | Vertical scale, with 1.0 being 100%. |
|
overridevirtual |
Schedule a flip to occur later.
This is needed if a flip should occur sometime in the future to the hardware.
Implements Screen.
|
virtual |
Show the plane on the display.
|
virtual |
Get the vertical scale value.
|
protected |
Current flip index.
|
protected |
Plane instance pointer.
|
protected |
Internal thread pool for flipping.