Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QEglFSKmsGbmScreen Class Reference

#include <qeglfskmsgbmscreen_p.h>

+ Inheritance diagram for QEglFSKmsGbmScreen:
+ Collaboration diagram for QEglFSKmsGbmScreen:

Classes

struct  CloneDestination
 
struct  FrameBuffer
 

Public Member Functions

 QEglFSKmsGbmScreen (QEglFSKmsDevice *device, const QKmsOutput &output, bool headless)
 
 ~QEglFSKmsGbmScreen ()
 
QPlatformCursorcursor () const override
 Reimplement this function in subclass to return the cursor of the screen.
 
gbm_surface * createSurface (EGLConfig eglConfig)
 
void resetSurface ()
 
void initCloning (QPlatformScreen *screenThisScreenClones, const QList< QPlatformScreen * > &screensCloningThisScreen)
 
void waitForFlip () override
 
virtual void flip ()
 
virtual void updateFlipStatus ()
 
virtual uint32_t gbmFlags ()
 
- 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
 
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.
 
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 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 QColorSpace colorSpace () const
 
virtual qreal devicePixelRatio () const
 Reimplement this function in subclass to return the device pixel ratio for the screen.
 
QWindowList windows () const
 Return all windows residing on this screen.
 
const QPlatformScreenscreenForPosition (const QPoint &point) const
 Find the sibling screen corresponding to globalPos.
 
QScreenscreen () const
 

Protected Member Functions

void flipFinished ()
 
void ensureModeSet (uint32_t fb)
 
void cloneDestFlipFinished (QEglFSKmsGbmScreen *cloneDestScreen)
 
void waitForFlipWithEventReader (QEglFSKmsGbmScreen *screen)
 
FrameBufferframebufferForBufferObject (gbm_bo *bo)
 
- Protected Member Functions inherited from QPlatformScreen
void resizeMaximizedWindows ()
 Convenience method to resize all the maximized and fullscreen windows of this platform screen.
 

Static Protected Member Functions

static void nonThreadedPageFlipHandler (int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data)
 
static void bufferDestroyedHandler (gbm_bo *bo, void *data)
 

Protected Attributes

gbm_surface * m_gbm_surface
 
gbm_bo * m_gbm_bo_current
 
gbm_bo * m_gbm_bo_next
 
bool m_flipPending
 
QMutex m_flipMutex
 
QWaitCondition m_flipCond
 
QScopedPointer< QEglFSKmsGbmCursorm_cursor
 
QEglFSKmsGbmScreenm_cloneSource
 
QList< CloneDestinationm_cloneDests
 
bool needsNewModeSetForNextFb = false
 
- 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
 

Static Protected Attributes

static QMutex m_nonThreadedFlipMutex
 

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)
 

Detailed Description

Definition at line 30 of file qeglfskmsgbmscreen_p.h.

Constructor & Destructor Documentation

◆ QEglFSKmsGbmScreen()

QEglFSKmsGbmScreen::QEglFSKmsGbmScreen ( QEglFSKmsDevice * device,
const QKmsOutput & output,
bool headless )

Definition at line 81 of file qeglfskmsgbmscreen.cpp.

◆ ~QEglFSKmsGbmScreen()

QEglFSKmsGbmScreen::~QEglFSKmsGbmScreen ( )

Definition at line 92 of file qeglfskmsgbmscreen.cpp.

References QEglFSKmsScreen::device(), qCDebug, and qGuiApp.

+ Here is the call graph for this function:

Member Function Documentation

◆ bufferDestroyedHandler()

void QEglFSKmsGbmScreen::bufferDestroyedHandler ( gbm_bo * bo,
void * data )
staticprotected

Definition at line 37 of file qeglfskmsgbmscreen.cpp.

References QEglFSKmsScreen::device(), and QEglFSKmsGbmScreen::FrameBuffer::fb.

Referenced by framebufferForBufferObject().

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

◆ cloneDestFlipFinished()

void QEglFSKmsGbmScreen::cloneDestFlipFinished ( QEglFSKmsGbmScreen * cloneDestScreen)
protected

Definition at line 484 of file qeglfskmsgbmscreen.cpp.

References d, m_cloneDests, and updateFlipStatus().

Referenced by flipFinished().

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

◆ createSurface()

gbm_surface * QEglFSKmsGbmScreen::createSurface ( EGLConfig eglConfig)

◆ cursor()

QPlatformCursor * QEglFSKmsGbmScreen::cursor ( ) const
overridevirtual

Reimplement this function in subclass to return the cursor of the screen.

The default implementation returns \nullptr.

Reimplemented from QPlatformScreen.

Definition at line 100 of file qeglfskmsgbmscreen.cpp.

References QEglFSScreen::cursor(), QScopedPointer< T, Cleanup >::data(), QEglFSKmsScreen::device(), QScopedPointer< T, Cleanup >::isNull(), m_cursor, QScopedPointer< T, Cleanup >::reset(), and QKmsDevice::screenConfig().

+ Here is the call graph for this function:

◆ ensureModeSet()

void QEglFSKmsGbmScreen::ensureModeSet ( uint32_t fb)
protected

Definition at line 217 of file qeglfskmsgbmscreen.cpp.

References QKmsOutput::activePropertyId, QKmsOutput::connector_id, QKmsOutput::crtc_id, QKmsOutput::crtcIdPropertyId, QEglFSKmsScreen::currentMode(), QEglFSKmsScreen::device(), QKmsDevice::fd(), QKmsOutput::mode, QKmsOutput::mode_blob_id, QKmsOutput::mode_set, QKmsOutput::modeIdPropertyId, QKmsOutput::modes, QEglFSKmsScreen::name(), needsNewModeSetForNextFb, QEglFSKmsScreen::output(), QPlatformScreen::PowerStateOn, qCDebug, qErrnoWarning(), qPrintable, request, ret, and QEglFSKmsScreen::setPowerState().

Referenced by flip().

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

◆ flip()

void QEglFSKmsGbmScreen::flip ( )
virtual

Definition at line 358 of file qeglfskmsgbmscreen.cpp.

References d, QEglFSKmsScreen::device(), ensureModeSet(), QKmsDevice::fd(), framebufferForBufferObject(), m_cloneDests, m_cloneSource, m_flipPending, m_gbm_bo_next, m_gbm_surface, QEglFSKmsScreen::m_headless, QEglFSKmsScreen::name(), QEglFSKmsScreen::output(), qEnvironmentVariableIntValue(), qErrnoWarning(), qPrintable, qScopeGuard(), qWarning, request, and ret.

+ Here is the call graph for this function:

◆ flipFinished()

void QEglFSKmsGbmScreen::flipFinished ( )
protected

Definition at line 473 of file qeglfskmsgbmscreen.cpp.

References cloneDestFlipFinished(), m_cloneSource, m_flipPending, and updateFlipStatus().

+ Here is the call graph for this function:

◆ framebufferForBufferObject()

QEglFSKmsGbmScreen::FrameBuffer * QEglFSKmsGbmScreen::framebufferForBufferObject ( gbm_bo * bo)
protected

Definition at line 49 of file qeglfskmsgbmscreen.cpp.

References bufferDestroyedHandler(), QEglFSKmsScreen::device(), gbmFormatToDrmFormat(), qCDebug, qWarning, and ret.

Referenced by flip().

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

◆ gbmFlags()

virtual uint32_t QEglFSKmsGbmScreen::gbmFlags ( )
inlinevirtual

Definition at line 49 of file qeglfskmsgbmscreen_p.h.

Referenced by createSurface().

+ Here is the caller graph for this function:

◆ initCloning()

void QEglFSKmsGbmScreen::initCloning ( QPlatformScreen * screenThisScreenClones,
const QList< QPlatformScreen * > & screensCloningThisScreen )

Definition at line 195 of file qeglfskmsgbmscreen.cpp.

References d, m_cloneDests, m_cloneSource, QEglFSKmsScreen::name(), qCDebug, qPrintable, qWarning, and QEglFSKmsGbmScreen::CloneDestination::screen.

Referenced by QEglFSKmsGbmDevice::registerScreenCloning().

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

◆ nonThreadedPageFlipHandler()

void QEglFSKmsGbmScreen::nonThreadedPageFlipHandler ( int fd,
unsigned int sequence,
unsigned int tv_sec,
unsigned int tv_usec,
void * user_data )
staticprotected

Definition at line 263 of file qeglfskmsgbmscreen.cpp.

References Q_UNUSED, QPlatformScreen::screen(), and user_data.

Referenced by waitForFlip().

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

◆ resetSurface()

void QEglFSKmsGbmScreen::resetSurface ( )

Definition at line 178 of file qeglfskmsgbmscreen.cpp.

References QEglFSKmsScreen::device(), m_flipPending, m_gbm_bo_current, m_gbm_surface, and needsNewModeSetForNextFb.

+ Here is the call graph for this function:

◆ updateFlipStatus()

void QEglFSKmsGbmScreen::updateFlipStatus ( )
virtual

Definition at line 495 of file qeglfskmsgbmscreen.cpp.

References d, m_cloneDests, m_cloneSource, m_flipPending, m_gbm_bo_current, m_gbm_bo_next, and m_gbm_surface.

Referenced by cloneDestFlipFinished(), and flipFinished().

+ Here is the caller graph for this function:

◆ waitForFlip()

void QEglFSKmsGbmScreen::waitForFlip ( )
overridevirtual

Reimplemented from QEglFSKmsScreen.

Definition at line 286 of file qeglfskmsgbmscreen.cpp.

References d, QEglFSKmsScreen::device(), lock, m_cloneDests, m_cloneSource, m_gbm_bo_next, QEglFSKmsScreen::m_headless, m_nonThreadedFlipMutex, nonThreadedPageFlipHandler(), QEglFSKmsGbmDevice::usesEventReader(), and waitForFlipWithEventReader().

+ Here is the call graph for this function:

◆ waitForFlipWithEventReader()

void QEglFSKmsGbmScreen::waitForFlipWithEventReader ( QEglFSKmsGbmScreen * screen)
protected

Definition at line 276 of file qeglfskmsgbmscreen.cpp.

References QEglFSKmsScreen::device(), QEglFSKmsGbmDevice::eventReader(), QMutex::lock(), m_flipCond, m_flipMutex, QPlatformScreen::screen(), QEglFSKmsEventReader::startWaitFlip(), QMutex::unlock(), and QWaitCondition::wait().

Referenced by waitForFlip().

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

Member Data Documentation

◆ m_cloneDests

QList<CloneDestination> QEglFSKmsGbmScreen::m_cloneDests
protected

◆ m_cloneSource

QEglFSKmsGbmScreen* QEglFSKmsGbmScreen::m_cloneSource
protected

Definition at line 80 of file qeglfskmsgbmscreen_p.h.

Referenced by flip(), flipFinished(), initCloning(), updateFlipStatus(), and waitForFlip().

◆ m_cursor

QScopedPointer<QEglFSKmsGbmCursor> QEglFSKmsGbmScreen::m_cursor
protected

Definition at line 72 of file qeglfskmsgbmscreen_p.h.

Referenced by cursor().

◆ m_flipCond

QWaitCondition QEglFSKmsGbmScreen::m_flipCond
protected

Definition at line 69 of file qeglfskmsgbmscreen_p.h.

Referenced by waitForFlipWithEventReader().

◆ m_flipMutex

QMutex QEglFSKmsGbmScreen::m_flipMutex
protected

Definition at line 68 of file qeglfskmsgbmscreen_p.h.

Referenced by waitForFlipWithEventReader().

◆ m_flipPending

bool QEglFSKmsGbmScreen::m_flipPending
protected

Definition at line 66 of file qeglfskmsgbmscreen_p.h.

Referenced by flip(), flipFinished(), resetSurface(), and updateFlipStatus().

◆ m_gbm_bo_current

gbm_bo* QEglFSKmsGbmScreen::m_gbm_bo_current
protected

Definition at line 64 of file qeglfskmsgbmscreen_p.h.

Referenced by resetSurface(), and updateFlipStatus().

◆ m_gbm_bo_next

gbm_bo* QEglFSKmsGbmScreen::m_gbm_bo_next
protected

Definition at line 65 of file qeglfskmsgbmscreen_p.h.

Referenced by flip(), updateFlipStatus(), and waitForFlip().

◆ m_gbm_surface

gbm_surface* QEglFSKmsGbmScreen::m_gbm_surface
protected

Definition at line 62 of file qeglfskmsgbmscreen_p.h.

Referenced by createSurface(), flip(), resetSurface(), and updateFlipStatus().

◆ m_nonThreadedFlipMutex

QT_BEGIN_NAMESPACE QMutex QEglFSKmsGbmScreen::m_nonThreadedFlipMutex
staticprotected

Definition at line 70 of file qeglfskmsgbmscreen_p.h.

Referenced by waitForFlip().

◆ needsNewModeSetForNextFb

bool QEglFSKmsGbmScreen::needsNewModeSetForNextFb = false
protected

Definition at line 87 of file qeglfskmsgbmscreen_p.h.

Referenced by ensureModeSet(), and resetSurface().


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