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
qbackingstoredefaultcompositor.cpp File Reference

(a744d308269066e2b9b0ee5f2615e739ac7be688)

#include "qbackingstoredefaultcompositor_p.h"
#include <QtGui/private/qwindow_p.h>
#include <qpa/qplatformgraphicsbuffer.h>
#include <QtCore/qfile.h>
+ Include dependency graph for qbackingstoredefaultcompositor.cpp:

Go to the source code of this file.

Enumerations

enum class  SourceTransformOrigin { BottomLeft , TopLeft }
 
enum class  PipelineBlend { None , Alpha , PremulAlpha }
 

Functions

static QRect scaledRect (const QRect &rect, qreal factor)
 
static QPoint scaledOffset (const QPoint &pt, qreal factor)
 
static QRegion scaledRegion (const QRegion &region, qreal factor, const QPoint &offset)
 
static QMatrix4x4 targetTransform (const QRectF &target, const QRect &viewport, bool invertY)
 
static QMatrix3x3 sourceTransform (const QRectF &subTexture, const QSize &textureSize, SourceTransformOrigin origin)
 
static QRect toBottomLeftRect (const QRect &topLeftRect, int windowHeight)
 
static bool prepareDrawForRenderToTextureWidget (const QPlatformTextureList *textures, int idx, QWindow *window, const QRect &deviceWindowRect, const QPoint &offset, bool invertTargetY, bool invertSource, QMatrix4x4 *target, QMatrix3x3 *source)
 
static QShader getShader (const QString &name)
 
static void updateMatrix3x3 (QRhiResourceUpdateBatch *resourceUpdates, QRhiBuffer *ubuf, const QMatrix3x3 &m)
 
static QRhiGraphicsPipelinecreateGraphicsPipeline (QRhi *rhi, QRhiShaderResourceBindings *srb, QRhiRenderPassDescriptor *rpDesc, PipelineBlend blend)
 

Variables

static const int UBUF_SIZE = 120
 

Enumeration Type Documentation

◆ PipelineBlend

enum class PipelineBlend
strong
Enumerator
None 
Alpha 
PremulAlpha 

Definition at line 270 of file qbackingstoredefaultcompositor.cpp.

◆ SourceTransformOrigin

enum class SourceTransformOrigin
strong
Enumerator
BottomLeft 
TopLeft 

Definition at line 174 of file qbackingstoredefaultcompositor.cpp.

Function Documentation

◆ createGraphicsPipeline()

◆ getShader()

static QShader getShader ( const QString & name)
static

Definition at line 243 of file qbackingstoredefaultcompositor.cpp.

References QShader::fromSerialized(), qPrintable, qWarning, and QIODeviceBase::ReadOnly.

Referenced by createGraphicsPipeline(), and main().

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

◆ prepareDrawForRenderToTextureWidget()

static bool prepareDrawForRenderToTextureWidget ( const QPlatformTextureList * textures,
int idx,
QWindow * window,
const QRect & deviceWindowRect,
const QPoint & offset,
bool invertTargetY,
bool invertSource,
QMatrix4x4 * target,
QMatrix3x3 * source )
static

Definition at line 211 of file qbackingstoredefaultcompositor.cpp.

References BottomLeft, QRect::height(), QRect::isEmpty(), scaledRect(), sourceTransform(), targetTransform(), toBottomLeftRect(), TopLeft, QRect::translate(), QRect::translated(), and window().

Referenced by QBackingStoreDefaultCompositor::flush().

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

◆ scaledOffset()

static QPoint scaledOffset ( const QPoint & pt,
qreal factor )
inlinestatic

Definition at line 131 of file qbackingstoredefaultcompositor.cpp.

Referenced by QBackingStoreDefaultCompositor::flush().

+ Here is the caller graph for this function:

◆ scaledRect()

static QRect scaledRect ( const QRect & rect,
qreal factor )
inlinestatic

Definition at line 126 of file qbackingstoredefaultcompositor.cpp.

References rect.

Referenced by QBackingStoreDefaultCompositor::flush(), prepareDrawForRenderToTextureWidget(), and scaledRegion().

+ Here is the caller graph for this function:

◆ scaledRegion()

static QRegion scaledRegion ( const QRegion & region,
qreal factor,
const QPoint & offset )
static

Definition at line 136 of file qbackingstoredefaultcompositor.cpp.

References rect, QRegion::rectCount(), scaledRect(), and QRegion::setRects().

Referenced by QBackingStoreDefaultCompositor::flush().

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

◆ sourceTransform()

static QMatrix3x3 sourceTransform ( const QRectF & subTexture,
const QSize & textureSize,
SourceTransformOrigin origin )
static

Definition at line 179 of file qbackingstoredefaultcompositor.cpp.

References QSize::height(), TopLeft, QSize::width(), QPointF::x(), and QPointF::y().

Referenced by QOpenGLTextureBlitterPrivate::blit(), QOpenGLTextureBlitterPrivate::blit(), QBackingStoreDefaultCompositor::flush(), prepareDrawForRenderToTextureWidget(), and QOpenGLTextureBlitterPrivate::toTextureCoordinates().

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

◆ targetTransform()

static QMatrix4x4 targetTransform ( const QRectF & target,
const QRect & viewport,
bool invertY )
static

Definition at line 151 of file qbackingstoredefaultcompositor.cpp.

References viewport().

Referenced by QOpenGLTextureBlitterPrivate::blit(), QOpenGLTextureBlitterPrivate::blit(), and prepareDrawForRenderToTextureWidget().

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

◆ toBottomLeftRect()

static QRect toBottomLeftRect ( const QRect & topLeftRect,
int windowHeight )
inlinestatic

Definition at line 205 of file qbackingstoredefaultcompositor.cpp.

Referenced by QBackingStoreDefaultCompositor::flush(), and prepareDrawForRenderToTextureWidget().

+ Here is the caller graph for this function:

◆ updateMatrix3x3()

static void updateMatrix3x3 ( QRhiResourceUpdateBatch * resourceUpdates,
QRhiBuffer * ubuf,
const QMatrix3x3 & m )
static

Definition at line 255 of file qbackingstoredefaultcompositor.cpp.

Variable Documentation

◆ UBUF_SIZE

const int UBUF_SIZE = 120
static