Commit de3b2541 authored by Joni Poikelin's avatar Joni Poikelin
Browse files

Clear old triangulated vertex data when a path is completely clipped



Old data was held in buffers which caused OpenGL paint engine to
re-render previous shape again with current settings if the current path
was completely clipped.

Pick-to: 5.15
Fixes: QTBUG-35513
Change-Id: I0cd448e0b18d199af11e82d79b1ab72d0f89c79e
Reviewed-by: default avatarEirik Aavitsland <eirik.aavitsland@qt.io>
parent f69dbb0b
...@@ -84,6 +84,7 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen, co ...@@ -84,6 +84,7 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen, co
const qreal *pts = path.points(); const qreal *pts = path.points();
const QPainterPath::ElementType *types = path.elements(); const QPainterPath::ElementType *types = path.elements();
int count = path.elementCount(); int count = path.elementCount();
m_vertices.reset();
if (count < 2) if (count < 2)
return; return;
...@@ -100,7 +101,6 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen, co ...@@ -100,7 +101,6 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen, co
m_join_style = qpen_joinStyle(pen); m_join_style = qpen_joinStyle(pen);
m_cap_style = qpen_capStyle(pen); m_cap_style = qpen_capStyle(pen);
m_vertices.reset();
m_miter_limit = pen.miterLimit() * qpen_widthf(pen); m_miter_limit = pen.miterLimit() * qpen_widthf(pen);
// The curvyness is based on the notion that I originally wanted // The curvyness is based on the notion that I originally wanted
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment