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
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 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
 
bool recreateBackBufferIfNeeded ()
 
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 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 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.
 
void setRhiConfig (const QPlatformBackingStoreRhiConfig &config)
 
QRhirhi () 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 55 of file qwaylandshmbackingstore_p.h.

Constructor & Destructor Documentation

◆ QWaylandShmBackingStore()

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

Definition at line 137 of file qwaylandshmbackingstore.cpp.

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

+ Here is the call graph for this function:

◆ ~QWaylandShmBackingStore()

QtWaylandClient::QWaylandShmBackingStore::~QWaylandShmBackingStore ( )
override

Definition at line 155 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 181 of file qwaylandshmbackingstore.cpp.

References QPainter::CompositionMode_Source, QImage::hasAlphaChannel(), QtWaylandClient::QWaylandShmBuffer::image(), QMargins::left(), paintDevice(), recreateBackBufferIfNeeded(), rect, QtWaylandClient::QWaylandWindow::setBackingStore(), QMargins::top(), QRegion::translated(), Qt::transparent, waylandWindow(), and windowDecorationMargins().

+ Here is the call graph for this function:

◆ contentSurface()

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

Definition at line 345 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 202 of file qwaylandshmbackingstore.cpp.

References flush(), and QPlatformBackingStore::window().

+ Here is the call graph for this function:

◆ entireSurface()

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

Definition at line 340 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 209 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 166 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:

◆ recreateBackBufferIfNeeded()

bool QtWaylandClient::QWaylandShmBackingStore::recreateBackBufferIfNeeded ( )

◆ resize()

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

Implements QPlatformBackingStore.

Definition at line 240 of file qwaylandshmbackingstore.cpp.

◆ waylandWindow()

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

Definition at line 407 of file qwaylandshmbackingstore.cpp.

References QPlatformBackingStore::window().

Referenced by QWaylandShmBackingStore(), ~QWaylandShmBackingStore(), beginPaint(), flush(), recreateBackBufferIfNeeded(), 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 395 of file qwaylandshmbackingstore.cpp.

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

Referenced by contentSurface(), flush(), recreateBackBufferIfNeeded(), 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 400 of file qwaylandshmbackingstore.cpp.

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

Referenced by beginPaint(), contentSurface(), flush(), and recreateBackBufferIfNeeded().

+ 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: