Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QtWaylandClient::QWaylandShmBackingStore Class Reference

#include <qwaylandshmbackingstore_p.h>

+ Inheritance diagram for QtWaylandClient::QWaylandShmBackingStore:
+ Collaboration diagram for QtWaylandClient::QWaylandShmBackingStore:

Public Member Functions

 QWaylandShmBackingStore (QWindow *window, QWaylandDisplay *display)
 
 ~QWaylandShmBackingStore () override
 
QPaintDevicepaintDevice () override
 Implement this function to return the appropriate paint device.
 
void flush (QWindow *window, const QRegion &region, const QPoint &offset) override
 Flushes the given region from the specified window.
 
void resize (const QSize &size, const QRegion &staticContents) override
 
void resize (const QSize &size)
 
void beginPaint (const QRegion &region) override
 This function is called before painting onto the surface begins, with the region in which the painting will occur.
 
void endPaint () override
 This function is called after painting onto the surface has ended.
 
QWaylandAbstractDecorationwindowDecoration () const
 
QMargins windowDecorationMargins () const
 
QImageentireSurface () const
 
QImagecontentSurface () const
 
void ensureSize ()
 
QWaylandWindowwaylandWindow () const
 
void iterateBuffer ()
 
- Public Member Functions inherited from QPlatformBackingStore
 QPlatformBackingStore (QWindow *window)
 Constructs an empty surface for the given top-level window.
 
virtual ~QPlatformBackingStore ()
 Destroys this surface.
 
QWindowwindow () const
 Returns a pointer to the top-level window associated with this surface.
 
QBackingStorebackingStore () const
 Returns a pointer to the backing store associated with this surface.
 
virtual QPaintDevicepaintDevice ()=0
 Implement this function to return the appropriate paint device.
 
virtual void flush (QWindow *window, const QRegion &region, const QPoint &offset)
 Flushes the given region from the specified window.
 
virtual FlushResult rhiFlush (QWindow *window, qreal sourceDevicePixelRatio, const QRegion &region, const QPoint &offset, QPlatformTextureList *textures, bool translucentBackground)
 Flushes the given region from the specified window, and compositing it with the specified textures list.
 
virtual QImage toImage () const
 Implemented in subclasses to return the content of the backingstore as a QImage.
 
virtual QRhiTexturetoTexture (QRhiResourceUpdateBatch *resourceUpdates, const QRegion &dirtyRegion, TextureFlags *flags) const
 May be reimplemented in subclasses to return the content of the backingstore as an QRhiTexture.
 
virtual QPlatformGraphicsBuffergraphicsBuffer () const
 Accessor for a backingstores graphics buffer abstraction.
 
virtual void resize (const QSize &size, const QRegion &staticContents)=0
 
virtual bool scroll (const QRegion &area, int dx, int dy)
 Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative.
 
virtual void beginPaint (const QRegion &)
 This function is called before painting onto the surface begins, with the region in which the painting will occur.
 
virtual void endPaint ()
 This function is called after painting onto the surface has ended.
 
void setRhiConfig (const QPlatformBackingStoreRhiConfig &config)
 
QRhirhi () const
 
QRhiSwapChainrhiSwapChain () const
 
void surfaceAboutToBeDestroyed ()
 
void graphicsDeviceReportedLost ()
 

Additional Inherited Members

- Public Types inherited from QPlatformBackingStore
enum  FlushResult { FlushSuccess , FlushFailed , FlushFailedDueToLostDevice }
 
enum  TextureFlag { TextureSwizzle = 0x01 , TextureFlip = 0x02 , TexturePremultiplied = 0x04 }
 

Detailed Description

Definition at line 52 of file qwaylandshmbackingstore_p.h.

Constructor & Destructor Documentation

◆ QWaylandShmBackingStore()

QtWaylandClient::QWaylandShmBackingStore::QWaylandShmBackingStore ( QWindow window,
QWaylandDisplay display 
)

Definition at line 135 of file qwaylandshmbackingstore.cpp.

References QObject::connect(), copy(), QSize::isValid(), qDeleteAll(), QtWaylandClient::QWaylandDisplay::reconnected(), resize(), waylandWindow(), and QPlatformBackingStore::window().

+ Here is the call graph for this function:

◆ ~QWaylandShmBackingStore()

QtWaylandClient::QWaylandShmBackingStore::~QWaylandShmBackingStore ( )
override

Definition at line 153 of file qwaylandshmbackingstore.cpp.

References qDeleteAll(), and waylandWindow().

+ Here is the call graph for this function:

Member Function Documentation

◆ beginPaint()

void QtWaylandClient::QWaylandShmBackingStore::beginPaint ( const QRegion )
overridevirtual

This function is called before painting onto the surface begins, with the region in which the painting will occur.

See also
endPaint(), paintDevice()

Reimplemented from QPlatformBackingStore.

Definition at line 169 of file qwaylandshmbackingstore.cpp.

References QPainter::CompositionMode_Source, ensureSize(), QImage::hasAlphaChannel(), QtWaylandClient::QWaylandShmBuffer::image(), paintDevice(), rect, QtWaylandClient::QWaylandWindow::setCanResize(), Qt::transparent, and waylandWindow().

+ Here is the call graph for this function:

◆ contentSurface()

QImage * QtWaylandClient::QWaylandShmBackingStore::contentSurface ( ) const

Definition at line 309 of file qwaylandshmbackingstore.cpp.

References QtWaylandClient::QWaylandShmBuffer::image(), QtWaylandClient::QWaylandShmBuffer::imageInsideMargins(), windowDecoration(), and windowDecorationMargins().

Referenced by paintDevice().

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

◆ endPaint()

void QtWaylandClient::QWaylandShmBackingStore::endPaint ( )
overridevirtual

This function is called after painting onto the surface has ended.

See also
beginPaint(), paintDevice()

Reimplemented from QPlatformBackingStore.

Definition at line 185 of file qwaylandshmbackingstore.cpp.

References flush(), QtWaylandClient::QWaylandWindow::setCanResize(), waylandWindow(), and QPlatformBackingStore::window().

+ Here is the call graph for this function:

◆ ensureSize()

void QtWaylandClient::QWaylandShmBackingStore::ensureSize ( )

Definition at line 193 of file qwaylandshmbackingstore.cpp.

References QtWaylandClient::QWaylandWindow::createDecoration(), resize(), QtWaylandClient::QWaylandWindow::setBackingStore(), and waylandWindow().

Referenced by beginPaint(), and QtWaylandClient::QWaylandWindow::ensureSize().

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

◆ entireSurface()

QImage * QtWaylandClient::QWaylandShmBackingStore::entireSurface ( ) const

Definition at line 304 of file qwaylandshmbackingstore.cpp.

References QtWaylandClient::QWaylandShmBuffer::image().

+ Here is the call graph for this function:

◆ flush()

void QtWaylandClient::QWaylandShmBackingStore::flush ( QWindow window,
const QRegion region,
const QPoint offset 
)
overridevirtual

Flushes the given region from the specified window.

Note
region is relative to the window which may not be top-level in case window corresponds to a native child widget. offset is the position of the native child relative to the top-level window.

Unlike rhiFlush(), this function's default implementation does nothing. It is expected that subclasses provide a platform-specific (non-QRhi-based) implementation, if applicable on the given platform.

See also
rhiFlush()

Reimplemented from QPlatformBackingStore.

Definition at line 200 of file qwaylandshmbackingstore.cpp.

References QMargins::left(), Q_UNUSED, QtWaylandClient::QWaylandWindow::safeCommit(), QMargins::top(), QRegion::translated(), waylandWindow(), QPlatformBackingStore::window(), windowDecoration(), and windowDecorationMargins().

Referenced by endPaint().

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

◆ iterateBuffer()

void QtWaylandClient::QWaylandShmBackingStore::iterateBuffer ( )

◆ paintDevice()

QPaintDevice * QtWaylandClient::QWaylandShmBackingStore::paintDevice ( )
overridevirtual

Implement this function to return the appropriate paint device.

Implements QPlatformBackingStore.

Definition at line 164 of file qwaylandshmbackingstore.cpp.

References contentSurface().

Referenced by beginPaint().

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

◆ resize() [1/2]

◆ resize() [2/2]

void QtWaylandClient::QWaylandShmBackingStore::resize ( const QSize size,
const QRegion staticContents 
)
overridevirtual

Implements QPlatformBackingStore.

Definition at line 231 of file qwaylandshmbackingstore.cpp.

Referenced by QWaylandShmBackingStore(), and ensureSize().

+ Here is the caller graph for this function:

◆ waylandWindow()

QWaylandWindow * QtWaylandClient::QWaylandShmBackingStore::waylandWindow ( ) const

Definition at line 364 of file qwaylandshmbackingstore.cpp.

References QPlatformBackingStore::window().

Referenced by QWaylandShmBackingStore(), ~QWaylandShmBackingStore(), beginPaint(), endPaint(), ensureSize(), flush(), resize(), and windowDecoration().

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

◆ windowDecoration()

QWaylandAbstractDecoration * QtWaylandClient::QWaylandShmBackingStore::windowDecoration ( ) const

Definition at line 352 of file qwaylandshmbackingstore.cpp.

References QtWaylandClient::QWaylandWindow::decoration(), and waylandWindow().

Referenced by contentSurface(), flush(), resize(), and windowDecorationMargins().

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

◆ windowDecorationMargins()

QMargins QtWaylandClient::QWaylandShmBackingStore::windowDecorationMargins ( ) const

Definition at line 357 of file qwaylandshmbackingstore.cpp.

References QtWaylandClient::QWaylandAbstractDecoration::margins(), and windowDecoration().

Referenced by contentSurface(), flush(), and resize().

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

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