summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-11-27 00:58:46 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-11-27 00:58:46 (GMT)
commit55bc5eb8b4e5d758f12761e67e063a418afa14a0 (patch)
treee3107f822b4eed6ac005e2d36c5c547403d0e7af
parente8d7d2172627dd3cac8b0cc3165ed371b524feb4 (diff)
downloadQt-55bc5eb8b4e5d758f12761e67e063a418afa14a0.zip
Qt-55bc5eb8b4e5d758f12761e67e063a418afa14a0.tar.gz
Qt-55bc5eb8b4e5d758f12761e67e063a418afa14a0.tar.bz2
Fix infinite recursion in OpenVG scissor-only clipping
When a complex transform was set, clip(QVectorPath) would call clip(QRect) with the control point rect, which would then turn around and say "transform is complex, call clip(QVectorPath)", causing an infinite loop until stack crash. Remove the "fall back to vector path" case as it isn't useful for scissor-only clipping. Doesn't affect mask-based clipping. Reviewed-by: Sarah Smith
-rw-r--r--src/openvg/qpaintengine_vg.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index ba97d4f..6b829dd 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -1570,12 +1570,6 @@ void QVGPaintEngine::clip(const QRect &rect, Qt::ClipOperation op)
d->dirty |= QPaintEngine::DirtyClipRegion;
- // If we have a non-simple transform, then use path-based clipping.
- if (op != Qt::NoClip && !clipTransformIsSimple(d->transform)) {
- QPaintEngineEx::clip(rect, op);
- return;
- }
-
switch (op) {
case Qt::NoClip:
{
@@ -1612,12 +1606,6 @@ void QVGPaintEngine::clip(const QRegion &region, Qt::ClipOperation op)
d->dirty |= QPaintEngine::DirtyClipRegion;
- // If we have a non-simple transform, then use path-based clipping.
- if (op != Qt::NoClip && !clipTransformIsSimple(d->transform)) {
- QPaintEngineEx::clip(region, op);
- return;
- }
-
switch (op) {
case Qt::NoClip:
{