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
QOpenGL2PaintEngineExPrivate Class Reference

#include <qopenglpaintengine_p.h>

+ Inheritance diagram for QOpenGL2PaintEngineExPrivate:
+ Collaboration diagram for QOpenGL2PaintEngineExPrivate:

Public Types

enum  StencilFillMode { OddEvenFillMode , WindingFillMode , TriStripStrokeFillMode }
 
enum  TextureUpdateMode { UpdateIfNeeded , ForceUpdate }
 

Public Member Functions

 QOpenGL2PaintEngineExPrivate (QOpenGL2PaintEngineEx *q_ptr)
 
 ~QOpenGL2PaintEngineExPrivate ()
 
void updateBrushTexture ()
 
void updateBrushUniforms ()
 
void updateMatrix ()
 
void updateCompositionMode ()
 
template<typename T >
void updateTexture (GLenum textureUnit, const T &texture, GLenum wrapMode, GLenum filterMode, TextureUpdateMode updateMode=UpdateIfNeeded)
 
template<typename T >
GLuint bindTexture (const T &texture, bool *newTextureCreated)
 
void activateTextureUnit (GLenum textureUnit)
 
void resetGLState ()
 
void fill (const QVectorPath &path)
 
void stroke (const QVectorPath &path, const QPen &pen)
 
void drawTexture (const QOpenGLRect &dest, const QOpenGLRect &src, const QSize &textureSize, bool opaque, bool pattern=false)
 
void drawPixmapFragments (const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap, QPainter::PixmapFragmentHints hints)
 
void drawCachedGlyphs (QFontEngine::GlyphFormat glyphFormat, QStaticTextItem *staticTextItem)
 
void uploadData (unsigned int arrayIndex, const GLfloat *data, GLuint count)
 
bool uploadIndexData (const void *data, GLenum indexValueType, GLuint count)
 
void drawVertexArrays (const float *data, int *stops, int stopCount, GLenum primitive)
 
void drawVertexArrays (QOpenGL2PEXVertexArray &vertexArray, GLenum primitive)
 
void composite (const QOpenGLRect &boundingRect)
 
void fillStencilWithVertexArray (const float *data, int count, int *stops, int stopCount, const QOpenGLRect &bounds, StencilFillMode mode)
 
void fillStencilWithVertexArray (QOpenGL2PEXVertexArray &vertexArray, bool useWindingFill)
 
void setBrush (const QBrush &brush)
 
void transferMode (EngineMode newMode)
 
bool prepareForDraw (bool srcPixelsAreOpaque)
 
bool prepareForCachedGlyphDraw (const QFontEngineGlyphCache &cache)
 
void useSimpleShader ()
 
GLuint location (const QOpenGLEngineShaderManager::Uniform uniform)
 
void clearClip (uint value)
 
void writeClip (const QVectorPath &path, uint value)
 
void resetClipIfNeeded ()
 
void updateClipScissorTest ()
 
void setScissor (const QRect &rect)
 
void regenerateClip ()
 
void systemStateChanged () override
 
void setVertexAttribArrayEnabled (int arrayIndex, bool enabled=true)
 
void syncGlState ()
 
template<>
GLuint bindTexture (const GLuint &textureId, bool *newTextureCreated)
 
template<>
GLuint bindTexture (const QImage &image, bool *newTextureCreated)
 
template<>
GLuint bindTexture (const QPixmap &pixmap, bool *newTextureCreated)
 
template<>
GLuint bindTexture (const QGradient &gradient, bool *newTextureCreated)
 
template<>
GLuint bindTexture (const ImageWithBindOptions &imageWithOptions, bool *newTextureCreated)
 
- Public Member Functions inherited from QPaintEngineExPrivate
 QPaintEngineExPrivate ()
 
 ~QPaintEngineExPrivate ()
 
void replayClipOperations ()
 
bool hasClipOperations () const
 
- Public Member Functions inherited from QPaintEnginePrivate
 QPaintEnginePrivate ()
 
virtual ~QPaintEnginePrivate ()
 
void updateSystemClip ()
 
void setSystemTransform (const QTransform &xform)
 
void setSystemViewport (const QRegion &region)
 
void setSystemTransformAndViewport (const QTransform &xform, const QRegion &region)
 
void drawBoxTextItem (const QPointF &p, const QTextItemInt &ti)
 
virtual QPaintEngineaggregateEngine ()
 
virtual Qt::HANDLE nativeHandle ()
 

Static Public Member Functions

static QOpenGLEngineShaderManagershaderManagerForEngine (QOpenGL2PaintEngineEx *engine)
 
static QOpenGL2PaintEngineExPrivategetData (QOpenGL2PaintEngineEx *engine)
 
static void cleanupVectorPath (QPaintEngineEx *engine, void *data)
 
- Static Public Member Functions inherited from QPaintEnginePrivate
static QPaintEnginePrivateget (QPaintEngine *paintEngine)
 

Public Attributes

QOpenGLExtensions funcs
 
QOpenGL2PaintEngineExq
 
QOpenGLEngineShaderManagershaderManager
 
QOpenGLPaintDevicedevice
 
int width
 
int height
 
QOpenGLContextctx
 
EngineMode mode
 
QFontEngine::GlyphFormat glyphCacheFormat
 
bool vertexAttributeArraysEnabledState [QT_GL_VERTEX_ARRAY_TRACKED_COUNT]
 
bool matrixDirty
 
bool compositionModeDirty
 
bool brushTextureDirty
 
bool brushUniformsDirty
 
bool opacityUniformDirty
 
bool matrixUniformDirty
 
bool stencilClean
 
bool useSystemClip
 
QRegion dirtyStencilRegion
 
QRect currentScissorBounds
 
uint maxClip
 
QBrush currentBrush
 
const QBrush noBrush
 
QImage currentBrushImage
 
QOpenGL2PEXVertexArray vertexCoordinateArray
 
QOpenGL2PEXVertexArray textureCoordinateArray
 
QList< GLushortelementIndices
 
GLuint elementIndicesVBOId
 
QDataBuffer< GLfloatopacityArray
 
GLfloat staticVertexCoordinateArray [8]
 
GLfloat staticTextureCoordinateArray [8]
 
bool snapToPixelGrid
 
bool nativePaintingActive
 
GLfloat pmvMatrix [3][3]
 
GLfloat inverseScale
 
GLenum lastTextureUnitUsed
 
GLuint lastTextureUsed
 
QOpenGLVertexArrayObject vao
 
QOpenGLBuffer vertexBuffer
 
QOpenGLBuffer texCoordBuffer
 
QOpenGLBuffer opacityBuffer
 
QOpenGLBuffer indexBuffer
 
bool needsSync
 
bool multisamplingAlwaysEnabled
 
QTriangulatingStroker stroker
 
QDashedStrokeProcessor dasher
 
QVarLengthArray< GLuint, 8 > unusedVBOSToClean
 
QVarLengthArray< GLuint, 8 > unusedIBOSToClean
 
const GLfloatvertexAttribPointers [3]
 
- Public Attributes inherited from QPaintEngineExPrivate
QStroker stroker
 
QDashStroker dasher
 
StrokeHandlerstrokeHandler
 
QStrokerOpsactiveStroker
 
QPen strokerPen
 
QRect exDeviceRect
 
- Public Attributes inherited from QPaintEnginePrivate
QPaintDevicepdev
 
QPaintEngineq_ptr
 
QRegion baseSystemClip
 
QRegion systemClip
 
QRect systemRect
 
QRegion systemViewport
 
QTransform systemTransform
 
QPaintDevicecurrentClipDevice
 
uint hasSystemTransform: 1
 
uint hasSystemViewport: 1
 

Detailed Description

Definition at line 141 of file qopenglpaintengine_p.h.

Member Enumeration Documentation

◆ StencilFillMode

Enumerator
OddEvenFillMode 
WindingFillMode 
TriStripStrokeFillMode 

Definition at line 145 of file qopenglpaintengine_p.h.

◆ TextureUpdateMode

Enumerator
UpdateIfNeeded 
ForceUpdate 

Definition at line 176 of file qopenglpaintengine_p.h.

Constructor & Destructor Documentation

◆ QOpenGL2PaintEngineExPrivate()

QOpenGL2PaintEngineExPrivate::QOpenGL2PaintEngineExPrivate ( QOpenGL2PaintEngineEx * q_ptr)
inline

Definition at line 151 of file qopenglpaintengine_p.h.

◆ ~QOpenGL2PaintEngineExPrivate()

QOpenGL2PaintEngineExPrivate::~QOpenGL2PaintEngineExPrivate ( )

Definition at line 83 of file qopenglpaintengine.cpp.

References QOpenGLBuffer::destroy(), QOpenGLVertexArrayObject::destroy(), elementIndicesVBOId, funcs, QOpenGLFunctions::glDeleteBuffers(), indexBuffer, opacityBuffer, shaderManager, texCoordBuffer, vao, and vertexBuffer.

+ Here is the call graph for this function:

Member Function Documentation

◆ activateTextureUnit()

void QOpenGL2PaintEngineExPrivate::activateTextureUnit ( GLenum textureUnit)

Definition at line 184 of file qopenglpaintengine.cpp.

References funcs, GL_TEXTURE0, QOpenGLFunctions::glActiveTexture(), GLuint, lastTextureUnitUsed, and lastTextureUsed.

Referenced by resetGLState(), and updateTexture().

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

◆ bindTexture() [1/6]

template<>
GLuint QOpenGL2PaintEngineExPrivate::bindTexture ( const GLuint & textureId,
bool * newTextureCreated )

Definition at line 199 of file qopenglpaintengine.cpp.

References funcs, QOpenGLFunctions::glBindTexture(), and lastTextureUsed.

+ Here is the call graph for this function:

◆ bindTexture() [2/6]

template<>
GLuint QOpenGL2PaintEngineExPrivate::bindTexture ( const ImageWithBindOptions & imageWithOptions,
bool * newTextureCreated )

Definition at line 249 of file qopenglpaintengine.cpp.

References QOpenGLTextureCache::cacheForContext(), and QOpenGLTextureCache::NewTexture.

+ Here is the call graph for this function:

◆ bindTexture() [3/6]

template<>
GLuint QOpenGL2PaintEngineExPrivate::bindTexture ( const QGradient & gradient,
bool * newTextureCreated )

Definition at line 229 of file qopenglpaintengine.cpp.

References bindTexture(), QOpenGL2GradientCache::cacheForContext(), and GLuint.

+ Here is the call graph for this function:

◆ bindTexture() [4/6]

template<>
GLuint QOpenGL2PaintEngineExPrivate::bindTexture ( const QImage & image,
bool * newTextureCreated )

Definition at line 211 of file qopenglpaintengine.cpp.

References QOpenGLTextureCache::cacheForContext(), and QOpenGLTextureCache::NewTexture.

+ Here is the call graph for this function:

◆ bindTexture() [5/6]

template<>
GLuint QOpenGL2PaintEngineExPrivate::bindTexture ( const QPixmap & pixmap,
bool * newTextureCreated )

Definition at line 220 of file qopenglpaintengine.cpp.

References QOpenGLTextureCache::cacheForContext(), QOpenGLTextureCache::NewTexture, and pixmap.

+ Here is the call graph for this function:

◆ bindTexture() [6/6]

template<typename T >
GLuint QOpenGL2PaintEngineExPrivate::bindTexture ( const T & texture,
bool * newTextureCreated )

Referenced by bindTexture(), and updateTexture().

+ Here is the caller graph for this function:

◆ cleanupVectorPath()

void QOpenGL2PaintEngineExPrivate::cleanupVectorPath ( QPaintEngineEx * engine,
void * data )
static

Definition at line 820 of file qopenglpaintengine.cpp.

References d, engine, QPaintEngine::OpenGL2, Q_ASSERT, and Q_UNUSED.

Referenced by fill().

+ Here is the caller graph for this function:

◆ clearClip()

void QOpenGL2PaintEngineExPrivate::clearClip ( uint value)

Definition at line 2417 of file qopenglpaintengine.cpp.

References currentScissorBounds, dirtyStencilRegion, funcs, QOpenGLFunctions::glClear(), QOpenGLFunctions::glClearStencil(), and QOpenGLFunctions::glStencilMask().

Referenced by systemStateChanged(), and writeClip().

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

◆ composite()

void QOpenGL2PaintEngineExPrivate::composite ( const QOpenGLRect & boundingRect)

Definition at line 1305 of file qopenglpaintengine.cpp.

References boundingRect(), funcs, QOpenGLFunctions::glDrawArrays(), QT_VERTEX_COORDS_ATTR, setCoords(), staticVertexCoordinateArray, and uploadData().

Referenced by fill(), fillStencilWithVertexArray(), resetClipIfNeeded(), stroke(), and writeClip().

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

◆ drawCachedGlyphs()

QT_WARNING_PUSH void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs ( QFontEngine::GlyphFormat glyphFormat,
QStaticTextItem * staticTextItem )

◆ drawPixmapFragments()

void QOpenGL2PaintEngineExPrivate::drawPixmapFragments ( const QPainter::PixmapFragment * fragments,
int fragmentCount,
const QPixmap & pixmap,
QPainter::PixmapFragmentHints hints )

Definition at line 2098 of file qopenglpaintengine.cpp.

References QOpenGL2PEXVertexArray::addVertex(), QOpenGL2PEXVertexArray::clear(), currentBrush, QOpenGLEngineShaderManager::currentProgram(), QOpenGL2PEXVertexArray::data(), QDataBuffer< Type >::data(), funcs, GL_CLAMP_TO_EDGE, QOpenGLFunctions::glDrawArrays(), GLenum(), GLfloat(), QPainter::PixmapFragment::height, i, ImageOpacityArrayDrawingMode, QOpenGLEngineShaderManager::ImageSrc, QOpenGLEngineShaderManager::ImageTexture, matrixDirty, noBrush, QPainter::PixmapFragment::opacity, opacityArray, QPainter::OpaqueHint, QOpenGLEngineShaderManager::PatternColor, QOpenGLEngineShaderManager::PatternSrc, pixmap, prepareForDraw(), qDegreesToRadians(), qFastCos(), qFastSin(), QT_IMAGE_TEXTURE_UNIT, QT_OPACITY_ATTR, qt_premultiplyColor(), QT_TEXTURE_COORDS_ATTR, QT_VERTEX_COORDS_ATTR, QDataBuffer< Type >::reset(), QPainter::PixmapFragment::scaleX, QPainter::PixmapFragment::scaleY, QOpenGLEngineShaderManager::setSrcPixelType(), QOpenGLShaderProgram::setUniformValue(), shaderManager, QDataBuffer< Type >::size(), QPainter::SmoothPixmapTransform, snapToPixelGrid, textureCoordinateArray, transferMode(), updateTexture(), uploadData(), vertexCoordinateArray, QOpenGL2PEXVertexArray::vertexCount(), QPainter::PixmapFragment::width, QPainter::PixmapFragment::x, QOpenGLPoint::x, QPainter::PixmapFragment::y, and QOpenGLPoint::y.

+ Here is the call graph for this function:

◆ drawTexture()

void QOpenGL2PaintEngineExPrivate::drawTexture ( const QOpenGLRect & dest,
const QOpenGLRect & src,
const QSize & textureSize,
bool opaque,
bool pattern = false )

◆ drawVertexArrays() [1/2]

void QOpenGL2PaintEngineExPrivate::drawVertexArrays ( const float * data,
int * stops,
int stopCount,
GLenum primitive )

Definition at line 1314 of file qopenglpaintengine.cpp.

References funcs, QOpenGLFunctions::glDrawArrays(), i, QT_VERTEX_COORDS_ATTR, and uploadData().

Referenced by fill(), fillStencilWithVertexArray(), and writeClip().

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

◆ drawVertexArrays() [2/2]

void QOpenGL2PaintEngineExPrivate::drawVertexArrays ( QOpenGL2PEXVertexArray & vertexArray,
GLenum primitive )
inline

Definition at line 200 of file qopenglpaintengine_p.h.

References QOpenGL2PEXVertexArray::data(), QOpenGL2PEXVertexArray::stopCount(), and QOpenGL2PEXVertexArray::stops().

+ Here is the call graph for this function:

◆ fill()

void QOpenGL2PaintEngineExPrivate::fill ( const QVectorPath & path)

◆ fillStencilWithVertexArray() [1/2]

void QOpenGL2PaintEngineExPrivate::fillStencilWithVertexArray ( const float * data,
int count,
int * stops,
int stopCount,
const QOpenGLRect & bounds,
StencilFillMode mode )

◆ fillStencilWithVertexArray() [2/2]

void QOpenGL2PaintEngineExPrivate::fillStencilWithVertexArray ( QOpenGL2PEXVertexArray & vertexArray,
bool useWindingFill )
inline

Definition at line 209 of file qopenglpaintengine_p.h.

References QOpenGL2PEXVertexArray::boundingRect(), QOpenGL2PEXVertexArray::data(), QOpenGL2PEXVertexArray::stopCount(), and QOpenGL2PEXVertexArray::stops().

+ Here is the call graph for this function:

◆ getData()

static QOpenGL2PaintEngineExPrivate * QOpenGL2PaintEngineExPrivate::getData ( QOpenGL2PaintEngineEx * engine)
inlinestatic

Definition at line 237 of file qopenglpaintengine_p.h.

References engine.

◆ location()

GLuint QOpenGL2PaintEngineExPrivate::location ( const QOpenGLEngineShaderManager::Uniform uniform)
inline

Definition at line 220 of file qopenglpaintengine_p.h.

◆ prepareForCachedGlyphDraw()

bool QOpenGL2PaintEngineExPrivate::prepareForCachedGlyphDraw ( const QFontEngineGlyphCache & cache)

Definition at line 1227 of file qopenglpaintengine.cpp.

References cache, prepareForDraw(), Q_ASSERT, ret, QTransform::scale(), and QTransform::TxScale.

+ Here is the call graph for this function:

◆ prepareForDraw()

bool QOpenGL2PaintEngineExPrivate::prepareForDraw ( bool srcPixelsAreOpaque)

◆ regenerateClip()

void QOpenGL2PaintEngineExPrivate::regenerateClip ( )

Definition at line 2565 of file qopenglpaintengine.cpp.

References QPaintEngineExPrivate::replayClipOperations(), and systemStateChanged().

+ Here is the call graph for this function:

◆ resetClipIfNeeded()

void QOpenGL2PaintEngineExPrivate::resetClipIfNeeded ( )

Definition at line 1192 of file qopenglpaintengine.cpp.

References QRectF::bottom(), composite(), funcs, GL_STENCIL_HIGH_BIT, QOpenGLFunctions::glColorMask(), QOpenGLFunctions::glEnable(), QOpenGLFunctions::glStencilFunc(), QOpenGLFunctions::glStencilMask(), QOpenGLFunctions::glStencilOp(), QRectF::left(), maxClip, rect, QRectF::right(), QRectF::top(), and useSimpleShader().

+ Here is the call graph for this function:

◆ resetGLState()

◆ setBrush()

◆ setScissor()

void QOpenGL2PaintEngineExPrivate::setScissor ( const QRect & rect)

Definition at line 2392 of file qopenglpaintengine.cpp.

References device, funcs, QOpenGLFunctions::glScissor(), QOpenGLPaintDevice::paintFlipped(), and rect.

Referenced by fillStencilWithVertexArray(), and updateClipScissorTest().

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

◆ setVertexAttribArrayEnabled()

void QOpenGL2PaintEngineExPrivate::setVertexAttribArrayEnabled ( int arrayIndex,
bool enabled = true )

Definition at line 2706 of file qopenglpaintengine.cpp.

References enabled, funcs, QOpenGLFunctions::glDisableVertexAttribArray(), QOpenGLFunctions::glEnableVertexAttribArray(), Q_ASSERT, QT_GL_VERTEX_ARRAY_TRACKED_COUNT, and vertexAttributeArraysEnabledState.

Referenced by Q_TRACE_INSTRUMENT(), and resetGLState().

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

◆ shaderManagerForEngine()

static QOpenGLEngineShaderManager * QOpenGL2PaintEngineExPrivate::shaderManagerForEngine ( QOpenGL2PaintEngineEx * engine)
inlinestatic

Definition at line 236 of file qopenglpaintengine_p.h.

References engine.

Referenced by QOpenGLCustomShaderStage::removeFromPainter(), and QOpenGLCustomShaderStage::setOnPainter().

+ Here is the caller graph for this function:

◆ stroke()

◆ syncGlState()

void QOpenGL2PaintEngineExPrivate::syncGlState ( )

Definition at line 2719 of file qopenglpaintengine.cpp.

References funcs, QOpenGLFunctions::glDisableVertexAttribArray(), QOpenGLFunctions::glEnableVertexAttribArray(), i, QT_GL_VERTEX_ARRAY_TRACKED_COUNT, and vertexAttributeArraysEnabledState.

+ Here is the call graph for this function:

◆ systemStateChanged()

void QOpenGL2PaintEngineExPrivate::systemStateChanged ( )
overridevirtual

Reimplemented from QPaintEnginePrivate.

Definition at line 2571 of file qopenglpaintengine.cpp.

References QRegion::boundingRect(), clearClip(), QPaintEnginePrivate::currentClipDevice, QRegion::isEmpty(), maxClip, qtVectorPathForPath(), QRegion::rectCount(), QPaintEnginePrivate::systemClip, updateClipScissorTest(), useSystemClip, QInternal::Widget, and writeClip().

Referenced by regenerateClip().

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

◆ transferMode()

void QOpenGL2PaintEngineExPrivate::transferMode ( EngineMode newMode)

◆ updateBrushTexture()

◆ updateBrushUniforms()

void QOpenGL2PaintEngineExPrivate::updateBrushUniforms ( )

Definition at line 316 of file qopenglpaintengine.cpp.

References QOpenGLEngineShaderManager::Angle, QOpenGLEngineShaderManager::BRadius, QOpenGLEngineShaderManager::BrushTexture, QOpenGLEngineShaderManager::BrushTransform, brushUniformsDirty, QConicalGradient::center(), QBrush::color(), Qt::ConicalGradientPattern, currentBrush, QOpenGLEngineShaderManager::currentProgram(), device, Qt::DiagCrossPattern, QOpenGLEngineShaderManager::Fmp, fmp, QOpenGLEngineShaderManager::Fmp2MRadius2, QOpenGLEngineShaderManager::FragmentColor, GLfloat(), QBrush::gradient(), QOpenGLEngineShaderManager::HalfViewportSize, halfViewportSize, height, QOpenGLEngineShaderManager::Inverse2Fmp2MRadius2, QTransform::inverted(), QOpenGLEngineShaderManager::InvertedTextureSize, QPixmap::isQBitmap(), QOpenGLEngineShaderManager::LinearData, Qt::LinearGradientPattern, Qt::NoBrush, QPainter::NonCosmeticBrushPatterns, QOpenGLPaintDevice::paintFlipped(), QOpenGLEngineShaderManager::PatternColor, qDegreesToRadians(), qHasPixmapTexture(), QT_BRUSH_TEXTURE_UNIT, qt_premultiplyColor(), qWarning, Qt::RadialGradientPattern, QOpenGLShaderProgram::setUniformValue(), shaderManager, Qt::SolidPattern, QOpenGLEngineShaderManager::SqrFr, QBrush::style(), QBrush::texture(), Qt::TexturePattern, QBrush::transform(), QTransform::translate(), translate(), QPointF::x(), and QPointF::y().

Referenced by prepareForDraw().

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

◆ updateClipScissorTest()

void QOpenGL2PaintEngineExPrivate::updateClipScissorTest ( )

Definition at line 2350 of file qopenglpaintengine.cpp.

References QRegion::boundingRect(), currentScissorBounds, funcs, GL_STENCIL_HIGH_BIT, QOpenGLFunctions::glDisable(), QOpenGLFunctions::glEnable(), QOpenGLFunctions::glStencilFunc(), QRect::intersected(), qWarning, setScissor(), QPaintEnginePrivate::systemClip, and useSystemClip.

Referenced by fill(), fillStencilWithVertexArray(), QOpenGLTextureGlyphCache::resizeTextureData(), stroke(), and systemStateChanged().

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

◆ updateCompositionMode()

void QOpenGL2PaintEngineExPrivate::updateCompositionMode ( )

Definition at line 514 of file qopenglpaintengine.cpp.

References QOpenGLFunctions::BlendEquationAdvanced, QPainter::CompositionMode_Clear, QPainter::CompositionMode_ColorBurn, QPainter::CompositionMode_ColorDodge, QPainter::CompositionMode_Darken, QPainter::CompositionMode_Destination, QPainter::CompositionMode_DestinationAtop, QPainter::CompositionMode_DestinationIn, QPainter::CompositionMode_DestinationOut, QPainter::CompositionMode_DestinationOver, QPainter::CompositionMode_Difference, QPainter::CompositionMode_Exclusion, QPainter::CompositionMode_HardLight, QPainter::CompositionMode_Lighten, QPainter::CompositionMode_Multiply, QPainter::CompositionMode_Overlay, QPainter::CompositionMode_Plus, QPainter::CompositionMode_Screen, QPainter::CompositionMode_SoftLight, QPainter::CompositionMode_Source, QPainter::CompositionMode_SourceAtop, QPainter::CompositionMode_SourceIn, QPainter::CompositionMode_SourceOut, QPainter::CompositionMode_SourceOver, QPainter::CompositionMode_Xor, compositionModeDirty, funcs, GL_BLEND_ADVANCED_COHERENT_KHR, GL_COLORBURN_KHR, GL_COLORDODGE_KHR, GL_DARKEN_KHR, GL_DIFFERENCE_KHR, GL_EXCLUSION_KHR, GL_FUNC_ADD, GL_HARDLIGHT_KHR, GL_LIGHTEN_KHR, GL_MULTIPLY_KHR, GL_OVERLAY_KHR, GL_SCREEN_KHR, GL_SOFTLIGHT_KHR, QOpenGLFunctions::glBlendEquation(), QOpenGLFunctions::glBlendFunc(), QOpenGLFunctions::glDisable(), QOpenGLFunctions::glEnable(), qWarning, QOpenGLEngineShaderManager::setCompositionMode(), and shaderManager.

Referenced by prepareForDraw().

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

◆ updateMatrix()

void QOpenGL2PaintEngineExPrivate::updateMatrix ( )

Definition at line 443 of file qopenglpaintengine.cpp.

References dasher, device, funcs, GLfloat(), QOpenGLFunctions::glVertexAttrib3fv(), height, inverseScale, matrixDirty, matrixUniformDirty, QOpenGLPaintDevice::paintFlipped(), pmvMatrix, qAbs(), qMax(), QT_PMV_MATRIX_1_ATTR, QT_PMV_MATRIX_2_ATTR, QT_PMV_MATRIX_3_ATTR, QTriangulatingStroker::setInvScale(), QDashedStrokeProcessor::setInvScale(), snapToPixelGrid, stroker, QTransform::TxTranslate, and width.

Referenced by fill(), prepareForDraw(), stroke(), useSimpleShader(), and writeClip().

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

◆ updateTexture()

template<typename T >
void QOpenGL2PaintEngineExPrivate::updateTexture ( GLenum textureUnit,
const T & texture,
GLenum wrapMode,
GLenum filterMode,
TextureUpdateMode updateMode = UpdateIfNeeded )

Definition at line 160 of file qopenglpaintengine.cpp.

References activateTextureUnit(), bindTexture(), funcs, GLenum(), QOpenGLFunctions::glTexParameteri(), GLuint, lastTextureUsed, and UpdateIfNeeded.

Referenced by drawPixmapFragments(), and updateBrushTexture().

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

◆ uploadData()

void QOpenGL2PaintEngineExPrivate::uploadData ( unsigned int arrayIndex,
const GLfloat * data,
GLuint count )
inline

Definition at line 306 of file qopenglpaintengine_p.h.

References funcs, GL_FLOAT, Q_ASSERT, QT_OPACITY_ATTR, QT_TEXTURE_COORDS_ATTR, and QT_VERTEX_COORDS_ATTR.

Referenced by composite(), drawPixmapFragments(), drawVertexArrays(), fill(), fillStencilWithVertexArray(), Q_TRACE_INSTRUMENT(), QOpenGLTextureGlyphCache::resizeTextureData(), stroke(), and transferMode().

+ Here is the caller graph for this function:

◆ uploadIndexData()

bool QOpenGL2PaintEngineExPrivate::uploadIndexData ( const void * data,
GLenum indexValueType,
GLuint count )
inline

Definition at line 328 of file qopenglpaintengine_p.h.

References Q_ASSERT.

Referenced by fill().

+ Here is the caller graph for this function:

◆ useSimpleShader()

void QOpenGL2PaintEngineExPrivate::useSimpleShader ( )
inline

Definition at line 137 of file qopenglpaintengine.cpp.

References matrixDirty, shaderManager, updateMatrix(), and QOpenGLEngineShaderManager::useSimpleProgram().

Referenced by fillStencilWithVertexArray(), resetClipIfNeeded(), and writeClip().

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

◆ writeClip()

void QOpenGL2PaintEngineExPrivate::writeClip ( const QVectorPath & path,
uint value )

Definition at line 2429 of file qopenglpaintengine.cpp.

References QOpenGL2PEXVertexArray::addPath(), QOpenGL2PEXVertexArray::boundingRect(), BrushDrawingMode, QOpenGL2PEXVertexArray::clear(), clearClip(), composite(), drawVertexArrays(), fillStencilWithVertexArray(), funcs, GL_STENCIL_HIGH_BIT, QOpenGLFunctions::glColorMask(), QOpenGLFunctions::glEnable(), QOpenGLFunctions::glStencilFunc(), QOpenGLFunctions::glStencilMask(), QOpenGLFunctions::glStencilOp(), inverseScale, matrixDirty, maxClip, snapToPixelGrid, stencilClean, transferMode(), updateMatrix(), useSimpleShader(), and vertexCoordinateArray.

Referenced by systemStateChanged().

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

Member Data Documentation

◆ brushTextureDirty

bool QOpenGL2PaintEngineExPrivate::brushTextureDirty

Definition at line 255 of file qopenglpaintengine_p.h.

Referenced by prepareForDraw(), setBrush(), and updateBrushTexture().

◆ brushUniformsDirty

bool QOpenGL2PaintEngineExPrivate::brushUniformsDirty

Definition at line 256 of file qopenglpaintengine_p.h.

Referenced by fill(), prepareForDraw(), setBrush(), and updateBrushUniforms().

◆ compositionModeDirty

bool QOpenGL2PaintEngineExPrivate::compositionModeDirty

Definition at line 254 of file qopenglpaintengine_p.h.

Referenced by prepareForDraw(), and updateCompositionMode().

◆ ctx

QOpenGLContext* QOpenGL2PaintEngineExPrivate::ctx

Definition at line 246 of file qopenglpaintengine_p.h.

◆ currentBrush

QBrush QOpenGL2PaintEngineExPrivate::currentBrush

◆ currentBrushImage

QImage QOpenGL2PaintEngineExPrivate::currentBrushImage

Definition at line 269 of file qopenglpaintengine_p.h.

Referenced by setBrush(), and updateBrushTexture().

◆ currentScissorBounds

QRect QOpenGL2PaintEngineExPrivate::currentScissorBounds

◆ dasher

QDashedStrokeProcessor QOpenGL2PaintEngineExPrivate::dasher

Definition at line 297 of file qopenglpaintengine_p.h.

Referenced by stroke(), and updateMatrix().

◆ device

QOpenGLPaintDevice* QOpenGL2PaintEngineExPrivate::device

Definition at line 244 of file qopenglpaintengine_p.h.

Referenced by fill(), setScissor(), updateBrushUniforms(), and updateMatrix().

◆ dirtyStencilRegion

QRegion QOpenGL2PaintEngineExPrivate::dirtyStencilRegion

Definition at line 262 of file qopenglpaintengine_p.h.

Referenced by clearClip(), and fillStencilWithVertexArray().

◆ elementIndices

QList<GLushort> QOpenGL2PaintEngineExPrivate::elementIndices

Definition at line 273 of file qopenglpaintengine_p.h.

◆ elementIndicesVBOId

GLuint QOpenGL2PaintEngineExPrivate::elementIndicesVBOId

Definition at line 274 of file qopenglpaintengine_p.h.

Referenced by ~QOpenGL2PaintEngineExPrivate().

◆ funcs

◆ glyphCacheFormat

QFontEngine::GlyphFormat QOpenGL2PaintEngineExPrivate::glyphCacheFormat

Definition at line 248 of file qopenglpaintengine_p.h.

◆ height

int QOpenGL2PaintEngineExPrivate::height

◆ indexBuffer

QOpenGLBuffer QOpenGL2PaintEngineExPrivate::indexBuffer

Definition at line 291 of file qopenglpaintengine_p.h.

Referenced by ~QOpenGL2PaintEngineExPrivate().

◆ inverseScale

GLfloat QOpenGL2PaintEngineExPrivate::inverseScale

Definition at line 282 of file qopenglpaintengine_p.h.

Referenced by fill(), stroke(), updateMatrix(), and writeClip().

◆ lastTextureUnitUsed

GLenum QOpenGL2PaintEngineExPrivate::lastTextureUnitUsed

Definition at line 284 of file qopenglpaintengine_p.h.

Referenced by activateTextureUnit().

◆ lastTextureUsed

GLuint QOpenGL2PaintEngineExPrivate::lastTextureUsed

Definition at line 285 of file qopenglpaintengine_p.h.

Referenced by activateTextureUnit(), bindTexture(), and updateTexture().

◆ matrixDirty

bool QOpenGL2PaintEngineExPrivate::matrixDirty

◆ matrixUniformDirty

bool QOpenGL2PaintEngineExPrivate::matrixUniformDirty

Definition at line 258 of file qopenglpaintengine_p.h.

Referenced by prepareForDraw(), and updateMatrix().

◆ maxClip

uint QOpenGL2PaintEngineExPrivate::maxClip

Definition at line 264 of file qopenglpaintengine_p.h.

Referenced by resetClipIfNeeded(), systemStateChanged(), and writeClip().

◆ mode

EngineMode QOpenGL2PaintEngineExPrivate::mode

Definition at line 247 of file qopenglpaintengine_p.h.

◆ multisamplingAlwaysEnabled

bool QOpenGL2PaintEngineExPrivate::multisamplingAlwaysEnabled

Definition at line 294 of file qopenglpaintengine_p.h.

◆ nativePaintingActive

bool QOpenGL2PaintEngineExPrivate::nativePaintingActive

Definition at line 280 of file qopenglpaintengine_p.h.

◆ needsSync

bool QOpenGL2PaintEngineExPrivate::needsSync

Definition at line 293 of file qopenglpaintengine_p.h.

◆ noBrush

const QBrush QOpenGL2PaintEngineExPrivate::noBrush

Definition at line 267 of file qopenglpaintengine_p.h.

Referenced by drawPixmapFragments(), and Q_TRACE_INSTRUMENT().

◆ opacityArray

QDataBuffer<GLfloat> QOpenGL2PaintEngineExPrivate::opacityArray

Definition at line 275 of file qopenglpaintengine_p.h.

Referenced by drawPixmapFragments(), and transferMode().

◆ opacityBuffer

QOpenGLBuffer QOpenGL2PaintEngineExPrivate::opacityBuffer

Definition at line 290 of file qopenglpaintengine_p.h.

Referenced by ~QOpenGL2PaintEngineExPrivate().

◆ opacityUniformDirty

bool QOpenGL2PaintEngineExPrivate::opacityUniformDirty

Definition at line 257 of file qopenglpaintengine_p.h.

Referenced by prepareForDraw().

◆ pmvMatrix

GLfloat QOpenGL2PaintEngineExPrivate::pmvMatrix[3][3]

Definition at line 281 of file qopenglpaintengine_p.h.

Referenced by prepareForDraw(), and updateMatrix().

◆ q

QOpenGL2PaintEngineEx* QOpenGL2PaintEngineExPrivate::q

Definition at line 242 of file qopenglpaintengine_p.h.

◆ shaderManager

◆ snapToPixelGrid

bool QOpenGL2PaintEngineExPrivate::snapToPixelGrid

◆ staticTextureCoordinateArray

GLfloat QOpenGL2PaintEngineExPrivate::staticTextureCoordinateArray[8]

Definition at line 277 of file qopenglpaintengine_p.h.

Referenced by Q_TRACE_INSTRUMENT(), and transferMode().

◆ staticVertexCoordinateArray

GLfloat QOpenGL2PaintEngineExPrivate::staticVertexCoordinateArray[8]

Definition at line 276 of file qopenglpaintengine_p.h.

Referenced by composite(), Q_TRACE_INSTRUMENT(), and transferMode().

◆ stencilClean

bool QOpenGL2PaintEngineExPrivate::stencilClean

Definition at line 260 of file qopenglpaintengine_p.h.

Referenced by fillStencilWithVertexArray(), and writeClip().

◆ stroker

QTriangulatingStroker QOpenGL2PaintEngineExPrivate::stroker

Definition at line 296 of file qopenglpaintengine_p.h.

Referenced by stroke(), and updateMatrix().

◆ texCoordBuffer

QOpenGLBuffer QOpenGL2PaintEngineExPrivate::texCoordBuffer

Definition at line 289 of file qopenglpaintengine_p.h.

Referenced by ~QOpenGL2PaintEngineExPrivate().

◆ textureCoordinateArray

QOpenGL2PEXVertexArray QOpenGL2PaintEngineExPrivate::textureCoordinateArray

Definition at line 272 of file qopenglpaintengine_p.h.

Referenced by drawPixmapFragments(), and transferMode().

◆ unusedIBOSToClean

QVarLengthArray<GLuint, 8> QOpenGL2PaintEngineExPrivate::unusedIBOSToClean

Definition at line 300 of file qopenglpaintengine_p.h.

◆ unusedVBOSToClean

QVarLengthArray<GLuint, 8> QOpenGL2PaintEngineExPrivate::unusedVBOSToClean

Definition at line 299 of file qopenglpaintengine_p.h.

◆ useSystemClip

bool QOpenGL2PaintEngineExPrivate::useSystemClip

Definition at line 261 of file qopenglpaintengine_p.h.

Referenced by systemStateChanged(), and updateClipScissorTest().

◆ vao

QOpenGLVertexArrayObject QOpenGL2PaintEngineExPrivate::vao

Definition at line 287 of file qopenglpaintengine_p.h.

Referenced by ~QOpenGL2PaintEngineExPrivate(), and resetGLState().

◆ vertexAttribPointers

const GLfloat* QOpenGL2PaintEngineExPrivate::vertexAttribPointers[3]

Definition at line 302 of file qopenglpaintengine_p.h.

◆ vertexAttributeArraysEnabledState

bool QOpenGL2PaintEngineExPrivate::vertexAttributeArraysEnabledState[QT_GL_VERTEX_ARRAY_TRACKED_COUNT]

Definition at line 250 of file qopenglpaintengine_p.h.

Referenced by setVertexAttribArrayEnabled(), and syncGlState().

◆ vertexBuffer

QOpenGLBuffer QOpenGL2PaintEngineExPrivate::vertexBuffer

Definition at line 288 of file qopenglpaintengine_p.h.

Referenced by ~QOpenGL2PaintEngineExPrivate().

◆ vertexCoordinateArray

QOpenGL2PEXVertexArray QOpenGL2PaintEngineExPrivate::vertexCoordinateArray

Definition at line 271 of file qopenglpaintengine_p.h.

Referenced by drawPixmapFragments(), fill(), transferMode(), and writeClip().

◆ width

int QOpenGL2PaintEngineExPrivate::width

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