diff options
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsggeometry.cpp | 6 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgtexture.cpp | 4 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgdefaultglyphnode_p.cpp | 4 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgrhishadereffectnode.cpp | 12 |
4 files changed, 23 insertions, 3 deletions
diff --git a/src/quick/scenegraph/coreapi/qsggeometry.cpp b/src/quick/scenegraph/coreapi/qsggeometry.cpp index c8ecf49767..cf369f55a6 100644 --- a/src/quick/scenegraph/coreapi/qsggeometry.cpp +++ b/src/quick/scenegraph/coreapi/qsggeometry.cpp @@ -406,8 +406,10 @@ const QSGGeometry::AttributeSet &QSGGeometry::defaultAttributes_ColoredPoint2D() Geometry objects are constructed by default with DrawTriangleStrip as the drawing mode. - The attribute structure is assumed to be POD and the geometry object - assumes this will not go away. There is no memory management involved. + \note \a attributes and the \l Attribute objects referenced by it must + stay valid for the entire lifetime of the QSGGeometry. + QSGGeometry stores a reference to \a attributes and does not delete + the \l Attribute objects. */ QSGGeometry::QSGGeometry(const QSGGeometry::AttributeSet &attributes, diff --git a/src/quick/scenegraph/coreapi/qsgtexture.cpp b/src/quick/scenegraph/coreapi/qsgtexture.cpp index 8ee1220b0d..b79999c3ea 100644 --- a/src/quick/scenegraph/coreapi/qsgtexture.cpp +++ b/src/quick/scenegraph/coreapi/qsgtexture.cpp @@ -716,6 +716,7 @@ namespace QNativeInterface { \inmodule QtQuick \ingroup native-interfaces \ingroup native-interfaces-qsgtexture + \inheaderfile QSGTexture \brief Provides access to and enables adopting OpenGL texture objects. \since 6.0 */ @@ -816,6 +817,7 @@ namespace QNativeInterface { \inmodule QtQuick \ingroup native-interfaces \ingroup native-interfaces-qsgtexture + \inheaderfile QSGTexture \brief Provides access to and enables adopting Direct3D 11 texture objects. \since 6.0 */ @@ -876,6 +878,7 @@ namespace QNativeInterface { \inmodule QtQuick \ingroup native-interfaces \ingroup native-interfaces-qsgtexture + \inheaderfile QSGTexture \brief Provides access to and enables adopting Metal texture objects. \since 6.0 */ @@ -923,6 +926,7 @@ namespace QNativeInterface { \inmodule QtQuick \ingroup native-interfaces \ingroup native-interfaces-qsgtexture + \inheaderfile QSGTexture \brief Provides access to and enables adopting Vulkan image objects. \since 6.0 */ diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp index 3b3f4c4abb..df0592cad1 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp @@ -508,9 +508,11 @@ void QSGTextMaskMaterial::populate(const QPointF &p, bool supportsSubPixelPositions = fontD->fontEngine->supportsHorizontalSubPixelPositions(); for (int i=0; i<glyphIndexes.size(); ++i) { QPointF glyphPosition = glyphPositions.at(i) + position; + QFixedPoint fixedPointPosition = fixedPointPositions.at(i); + QFixed subPixelPosition; if (supportsSubPixelPositions) - subPixelPosition = fontD->fontEngine->subPixelPositionForX(QFixed::fromReal(glyphPosition.x() * glyphCacheScaleX)); + subPixelPosition = fontD->fontEngine->subPixelPositionForX(QFixed::fromReal(fixedPointPosition.x.toReal() * glyphCacheScaleX)); QTextureGlyphCache::GlyphAndSubPixelPosition glyph(glyphIndexes.at(i), QFixedPoint(subPixelPosition, 0)); diff --git a/src/quick/scenegraph/qsgrhishadereffectnode.cpp b/src/quick/scenegraph/qsgrhishadereffectnode.cpp index e5903077a5..5575731675 100644 --- a/src/quick/scenegraph/qsgrhishadereffectnode.cpp +++ b/src/quick/scenegraph/qsgrhishadereffectnode.cpp @@ -117,6 +117,12 @@ void QSGRhiShaderLinker::feedSamplers(const QSGShaderEffectNode::ShaderData &sha const QSGShaderEffectNode::VariableData &vd(shader.varData.at(i)); if (var.type == QSGGuiThreadShaderEffectManager::ShaderInfo::Sampler) { Q_ASSERT(vd.specialType == QSGShaderEffectNode::VariableData::Source); + +#ifndef QT_NO_DEBUG + int existingBindPoint = m_samplerNameMap.value(var.name, -1); + Q_ASSERT(existingBindPoint < 0 || existingBindPoint == var.bindPoint); +#endif + m_samplers.insert(var.bindPoint, vd.value); m_samplerNameMap.insert(var.name, var.bindPoint); } @@ -125,6 +131,12 @@ void QSGRhiShaderLinker::feedSamplers(const QSGShaderEffectNode::ShaderData &sha for (int idx : *dirtyIndices) { const QSGGuiThreadShaderEffectManager::ShaderInfo::Variable &var(shader.shaderInfo.variables.at(idx)); const QSGShaderEffectNode::VariableData &vd(shader.varData.at(idx)); + +#ifndef QT_NO_DEBUG + int existingBindPoint = m_samplerNameMap.value(var.name, -1); + Q_ASSERT(existingBindPoint < 0 || existingBindPoint == var.bindPoint); +#endif + m_samplers.insert(var.bindPoint, vd.value); m_samplerNameMap.insert(var.name, var.bindPoint); } |