Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QEglFSKmsVsp2Screen Class Reference

#include <qeglfskmsvsp2screen.h>

+ Inheritance diagram for QEglFSKmsVsp2Screen:
+ Collaboration diagram for QEglFSKmsVsp2Screen:

Public Member Functions

 QEglFSKmsVsp2Screen (QEglFSKmsDevice *device, const QKmsOutput &output)
 
gbm_surface * createSurface ()
 
void resetSurface ()
 
void initDumbFrameBuffers ()
 
void initVsp2 ()
 
void initQtLayer ()
 
int addLayer (int dmabufFd, const QSize &size, const QPoint &position, uint drmPixelFormat, uint bytesPerLine) override
 
void setLayerBuffer (int id, int dmabufFd) override
 
void setLayerPosition (int id, const QPoint &position) override
 
void setLayerAlpha (int id, qreal alpha) override
 
bool removeLayer (int id) override
 
void addBlendListener (void(*callback)()) override
 
void flip ()
 
void blendAndFlipDrm ()
 
- Public Member Functions inherited from QEglFSKmsScreen
 QEglFSKmsScreen (QEglFSKmsDevice *device, const QKmsOutput &output, bool headless=false)
 
 ~QEglFSKmsScreen ()
 
void setVirtualPosition (const QPoint &pos)
 
QRect rawGeometry () const override
 
int depth () const override
 Reimplement in subclass to return current depth of the screen.
 
QImage::Format format () const override
 Reimplement in subclass to return the image format which corresponds to the screen format.
 
QSizeF physicalSize () const override
 Reimplement this function in subclass to return the physical size of the screen, in millimeters.
 
QDpi logicalDpi () const override
 Reimplement this function in subclass to return the logical horizontal and vertical dots per inch metrics of the screen.
 
QDpi logicalBaseDpi () const override
 Reimplement to return the base logical DPI for the platform.
 
Qt::ScreenOrientation nativeOrientation () const override
 Reimplement this function in subclass to return the native orientation of the screen, e.g.
 
Qt::ScreenOrientation orientation () const override
 Reimplement this function in subclass to return the current orientation of the screen, for example based on accelerometer data to determine the device orientation.
 
QString name () const override
 
QString manufacturer () const override
 Reimplement this function in subclass to return the manufacturer of this screen.
 
QString model () const override
 Reimplement this function in subclass to return the model of this screen.
 
QString serialNumber () const override
 Reimplement this function in subclass to return the serial number of this screen.
 
qreal refreshRate () const override
 Reimplement this function in subclass to return the vertical refresh rate of the screen, in Hz.
 
QList< QPlatformScreen * > virtualSiblings () const override
 Returns a list of all the platform screens that are part of the same virtual desktop.
 
void setVirtualSiblings (QList< QPlatformScreen * > sl)
 
QList< QPlatformScreen::Modemodes () const override
 Reimplement this function in subclass to return the list of modes for this screen.
 
int currentMode () const override
 Reimplement this function in subclass to return the index of the current mode from the modes list.
 
int preferredMode () const override
 Reimplement this function in subclass to return the preferred mode index from the modes list.
 
QEglFSKmsDevicedevice () const
 
virtual void waitForFlip ()
 
QKmsOutputoutput ()
 
void restoreMode ()
 
SubpixelAntialiasingType subpixelAntialiasingTypeHint () const override
 Returns a hint about this screen's subpixel layout structure.
 
QPlatformScreen::PowerState powerState () const override
 Returns the current power state.
 
void setPowerState (QPlatformScreen::PowerState state) override
 Sets the power state for this screen.
 
bool isCursorOutOfRange () const
 
void setCursorOutOfRange (bool b)
 
virtual void pageFlipped (unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec)
 
- Public Member Functions inherited from QEglFSScreen
 QEglFSScreen (EGLDisplay display)
 
 ~QEglFSScreen ()
 
QRect geometry () const override
 Reimplement in subclass to return the pixel geometry of the screen.
 
virtual QRect rawGeometry () const
 
int depth () const override
 Reimplement in subclass to return current depth of the screen.
 
QImage::Format format () const override
 Reimplement in subclass to return the image format which corresponds to the screen format.
 
QSizeF physicalSize () const override
 Reimplement this function in subclass to return the physical size of the screen, in millimeters.
 
QDpi logicalDpi () const override
 Reimplement this function in subclass to return the logical horizontal and vertical dots per inch metrics of the screen.
 
QDpi logicalBaseDpi () const override
 Reimplement to return the base logical DPI for the platform.
 
Qt::ScreenOrientation nativeOrientation () const override
 Reimplement this function in subclass to return the native orientation of the screen, e.g.
 
Qt::ScreenOrientation orientation () const override
 Reimplement this function in subclass to return the current orientation of the screen, for example based on accelerometer data to determine the device orientation.
 
QPlatformCursorcursor () const override
 Reimplement this function in subclass to return the cursor of the screen.
 
qreal refreshRate () const override
 Reimplement this function in subclass to return the vertical refresh rate of the screen, in Hz.
 
QPixmap grabWindow (WId wid, int x, int y, int width, int height) const override
 This function is called when Qt needs to be able to grab the content of a window.
 
EGLSurface primarySurface () const
 
EGLDisplay display () const
 
void handleCursorMove (const QPoint &pos)
 
QWindowtopLevelAt (const QPoint &point) const override
 Return the given top level window for a given position.
 
- Public Member Functions inherited from QPlatformScreen
 QPlatformScreen ()
 
virtual ~QPlatformScreen ()
 
virtual bool isPlaceholder () const
 
virtual QPixmap grabWindow (WId window, int x, int y, int width, int height) const
 This function is called when Qt needs to be able to grab the content of a window.
 
virtual QRect geometry () const =0
 Reimplement in subclass to return the pixel geometry of the screen.
 
virtual QRect availableGeometry () const
 Reimplement in subclass to return the pixel geometry of the available space This normally is the desktop screen minus the task manager, global menubar etc.
 
virtual int depth () const =0
 Reimplement in subclass to return current depth of the screen.
 
virtual QImage::Format format () const =0
 Reimplement in subclass to return the image format which corresponds to the screen format.
 
virtual QColorSpace colorSpace () const
 
virtual QSizeF physicalSize () const
 Reimplement this function in subclass to return the physical size of the screen, in millimeters.
 
virtual QDpi logicalDpi () const
 Reimplement this function in subclass to return the logical horizontal and vertical dots per inch metrics of the screen.
 
virtual QDpi logicalBaseDpi () const
 Reimplement to return the base logical DPI for the platform.
 
virtual qreal devicePixelRatio () const
 Reimplement this function in subclass to return the device pixel ratio for the screen.
 
virtual qreal refreshRate () const
 Reimplement this function in subclass to return the vertical refresh rate of the screen, in Hz.
 
virtual Qt::ScreenOrientation nativeOrientation () const
 Reimplement this function in subclass to return the native orientation of the screen, e.g.
 
virtual Qt::ScreenOrientation orientation () const
 Reimplement this function in subclass to return the current orientation of the screen, for example based on accelerometer data to determine the device orientation.
 
virtual QWindowtopLevelAt (const QPoint &point) const
 Return the given top level window for a given position.
 
QWindowList windows () const
 Return all windows residing on this screen.
 
virtual QList< QPlatformScreen * > virtualSiblings () const
 Returns a list of all the platform screens that are part of the same virtual desktop.
 
const QPlatformScreenscreenForPosition (const QPoint &point) const
 Find the sibling screen corresponding to globalPos.
 
QScreenscreen () const
 
virtual QString name () const
 
virtual QString manufacturer () const
 Reimplement this function in subclass to return the manufacturer of this screen.
 
virtual QString model () const
 Reimplement this function in subclass to return the model of this screen.
 
virtual QString serialNumber () const
 Reimplement this function in subclass to return the serial number of this screen.
 
virtual QPlatformCursorcursor () const
 Reimplement this function in subclass to return the cursor of the screen.
 
virtual SubpixelAntialiasingType subpixelAntialiasingTypeHint () const
 Returns a hint about this screen's subpixel layout structure.
 
virtual PowerState powerState () const
 Returns the current power state.
 
virtual void setPowerState (PowerState state)
 Sets the power state for this screen.
 
virtual QList< Modemodes () const
 Reimplement this function in subclass to return the list of modes for this screen.
 
virtual int currentMode () const
 Reimplement this function in subclass to return the index of the current mode from the modes list.
 
virtual int preferredMode () const
 Reimplement this function in subclass to return the preferred mode index from the modes list.
 

Additional Inherited Members

- Public Types inherited from QPlatformScreen
enum  SubpixelAntialiasingType {
  Subpixel_None , Subpixel_RGB , Subpixel_BGR , Subpixel_VRGB ,
  Subpixel_VBGR
}
 
enum  PowerState { PowerStateOn , PowerStateStandby , PowerStateSuspend , PowerStateOff }
 
- Static Public Member Functions inherited from QPlatformScreen
static QPlatformScreenplatformScreenForWindow (const QWindow *window)
 
static int angleBetween (Qt::ScreenOrientation a, Qt::ScreenOrientation b)
 
static QTransform transformBetween (Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &target)
 
static QRect mapBetween (Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &rect)
 
static QDpi overrideDpi (const QDpi &in)
 
- Protected Member Functions inherited from QPlatformScreen
void resizeMaximizedWindows ()
 Convenience method to resize all the maximized and fullscreen windows of this platform screen.
 
- Protected Attributes inherited from QEglFSKmsScreen
QEglFSKmsDevicem_device
 
QKmsOutput m_output
 
QEdidParser m_edid
 
QPoint m_pos
 
bool m_cursorOutOfRange
 
QList< QPlatformScreen * > m_siblings
 
PowerState m_powerState
 
QEglFSKmsInterruptHandlerm_interruptHandler
 
bool m_headless
 
- Protected Attributes inherited from QPlatformScreen
QScopedPointer< QPlatformScreenPrivated_ptr
 

Detailed Description

Definition at line 19 of file qeglfskmsvsp2screen.h.

Constructor & Destructor Documentation

◆ QEglFSKmsVsp2Screen()

QEglFSKmsVsp2Screen::QEglFSKmsVsp2Screen ( QEglFSKmsDevice device,
const QKmsOutput output 
)

Definition at line 66 of file qeglfskmsvsp2screen.cpp.

Member Function Documentation

◆ addBlendListener()

void QEglFSKmsVsp2Screen::addBlendListener ( void(*)()  callback)
override

Definition at line 171 of file qeglfskmsvsp2screen.cpp.

References QList< T >::append().

+ Here is the call graph for this function:

◆ addLayer()

int QEglFSKmsVsp2Screen::addLayer ( int  dmabufFd,
const QSize size,
const QPoint position,
uint  drmPixelFormat,
uint  bytesPerLine 
)
override

Definition at line 129 of file qeglfskmsvsp2screen.cpp.

References QVsp2BlendingDevice::enableInput(), position(), qCDebug, qWarning, and QVsp2BlendingDevice::setInputBuffer().

+ Here is the call graph for this function:

◆ blendAndFlipDrm()

void QEglFSKmsVsp2Screen::blendAndFlipDrm ( )

Definition at line 234 of file qeglfskmsvsp2screen.cpp.

References QVsp2BlendingDevice::blend(), cb, QEglFSKmsScreen::device(), QVsp2BlendingDevice::disableInput(), QKmsDevice::fd(), initDumbFrameBuffers(), initQtLayer(), initVsp2(), QVsp2BlendingDevice::isDirty(), Q_ASSERT, qWarning, and QVsp2BlendingDevice::setInputBuffer().

+ Here is the call graph for this function:

◆ createSurface()

gbm_surface * QEglFSKmsVsp2Screen::createSurface ( )

Definition at line 72 of file qeglfskmsvsp2screen.cpp.

References QEglFSKmsScreen::device(), QKmsOutput::drm_format, drmFormatToGbmFormat(), initDumbFrameBuffers(), initVsp2(), QEglFSKmsScreen::m_output, QEglFSKmsScreen::name(), Q_ASSERT, qCDebug, qPrintable, and QEglFSKmsScreen::rawGeometry().

+ Here is the call graph for this function:

◆ flip()

void QEglFSKmsVsp2Screen::flip ( )

Definition at line 176 of file qeglfskmsvsp2screen.cpp.

References QScopedPointer< T, Cleanup >::data(), QCoreApplication::postEvent(), qWarning, and QEvent::User.

+ Here is the call graph for this function:

◆ initDumbFrameBuffers()

void QEglFSKmsVsp2Screen::initDumbFrameBuffers ( )

Definition at line 99 of file qeglfskmsvsp2screen.cpp.

Referenced by blendAndFlipDrm(), and createSurface().

+ Here is the caller graph for this function:

◆ initQtLayer()

void QEglFSKmsVsp2Screen::initQtLayer ( )

Definition at line 114 of file qeglfskmsvsp2screen.cpp.

References QKmsOutput::drm_format, QVsp2BlendingDevice::enableInput(), QEglFSKmsScreen::m_output, q_fourccToString(), qFatal, qWarning, QEglFSKmsScreen::rawGeometry(), QRect::size(), and QSize::width().

Referenced by blendAndFlipDrm(), and initVsp2().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initVsp2()

void QEglFSKmsVsp2Screen::initVsp2 ( )

Definition at line 105 of file qeglfskmsvsp2screen.cpp.

References initQtLayer(), qCDebug, QEglFSKmsScreen::rawGeometry(), and QScopedPointer< T, Cleanup >::reset().

Referenced by blendAndFlipDrm(), and createSurface().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeLayer()

bool QEglFSKmsVsp2Screen::removeLayer ( int  id)
override

Definition at line 164 of file qeglfskmsvsp2screen.cpp.

References QVsp2BlendingDevice::disableInput().

+ Here is the call graph for this function:

◆ resetSurface()

void QEglFSKmsVsp2Screen::resetSurface ( )

Definition at line 94 of file qeglfskmsvsp2screen.cpp.

◆ setLayerAlpha()

void QEglFSKmsVsp2Screen::setLayerAlpha ( int  id,
qreal  alpha 
)
override

Definition at line 158 of file qeglfskmsvsp2screen.cpp.

References QVsp2BlendingDevice::setInputAlpha().

+ Here is the call graph for this function:

◆ setLayerBuffer()

void QEglFSKmsVsp2Screen::setLayerBuffer ( int  id,
int  dmabufFd 
)
override

Definition at line 142 of file qeglfskmsvsp2screen.cpp.

References QScopedPointer< T, Cleanup >::data(), QCoreApplication::postEvent(), QVsp2BlendingDevice::setInputBuffer(), and QEvent::User.

+ Here is the call graph for this function:

◆ setLayerPosition()

void QEglFSKmsVsp2Screen::setLayerPosition ( int  id,
const QPoint position 
)
override

Definition at line 152 of file qeglfskmsvsp2screen.cpp.

References position(), and QVsp2BlendingDevice::setInputPosition().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: