From f31d2c01e5998a9fcf4345fa66e0349921e115da Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Thu, 2 Jul 2009 09:57:52 +1000 Subject: OpenVG: use the correct clip region to detect single-rect clips "Special case: if the intersection of the system clip and the region is a single rectangle, then use the scissor for clipping." It was doing the intersection but then didn't use the intersection to test for the single-rectangle case. Task-number: QT-64 Reviewed-by: trustme --- src/openvg/qpaintengine_vg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index c7fe604..8ce3f69 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -1656,10 +1656,10 @@ void QVGPaintEngine::clip(const QRegion ®ion, Qt::ClipOperation op) clip = r; else clip = clip.intersect(r); - if (r.numRects() == 1) { + if (clip.numRects() == 1) { d->maskValid = false; d->maskIsSet = false; - d->maskRect = r.boundingRect(); + d->maskRect = clip.boundingRect(); vgSeti(VG_MASKING, VG_FALSE); updateScissor(); } else { -- cgit v0.12