aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/quick/scenegraph/qsgcurveprocessor.cpp3
-rw-r--r--src/quick/scenegraph/util/qquadpath.cpp7
2 files changed, 3 insertions, 7 deletions
diff --git a/src/quick/scenegraph/qsgcurveprocessor.cpp b/src/quick/scenegraph/qsgcurveprocessor.cpp
index 57b248c520..012c7b0747 100644
--- a/src/quick/scenegraph/qsgcurveprocessor.cpp
+++ b/src/quick/scenegraph/qsgcurveprocessor.cpp
@@ -1684,6 +1684,9 @@ void QSGCurveProcessor::processFill(const QQuadPath &fillPath,
};
QTriangleSet triangles = qTriangulate(internalHull);
+ // Workaround issue in qTriangulate() for single-triangle path
+ if (triangles.indices.size() == 3)
+ triangles.indices.setDataUint({ 0, 1, 2 });
const quint32 *idxTable = static_cast<const quint32 *>(triangles.indices.data());
for (int triangle = 0; triangle < triangles.indices.size() / 3; ++triangle) {
diff --git a/src/quick/scenegraph/util/qquadpath.cpp b/src/quick/scenegraph/util/qquadpath.cpp
index eff2508d8f..5b63aa65ce 100644
--- a/src/quick/scenegraph/util/qquadpath.cpp
+++ b/src/quick/scenegraph/util/qquadpath.cpp
@@ -682,13 +682,6 @@ QQuadPath QQuadPath::subPathsClosed(bool *didClose) const
endElement.ep = m_elements[subStart].sp;
}
- // ### Workaround for triangulator issue: Avoid 3-element paths
- if (res.elementCount() == 3) {
- res.splitElementAt(2);
- res = res.flattened();
- Q_ASSERT(res.elementCount() == 4);
- }
-
if (didClose)
*didClose = closed;
return res;