From 9c1d3bc253abd4418f3050d19ec5f05bef3ada97 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 27 Feb 2016 14:34:46 +0100 Subject: QtOpenGL/plugins/platformsupport: use new QRegion::begin()/end() instead of rect() Saves e.g. ~900b and ~2900b in text size in QtOpenGL and XcbQpa libs, resp., on optimized GCC 5.3 Linux AMD64 builds. Change-Id: Id904689164ca32df41118a23747c70048d8e6604 Reviewed-by: Lars Knoll --- src/plugins/platforms/offscreen/qoffscreencommon.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforms/offscreen') diff --git a/src/plugins/platforms/offscreen/qoffscreencommon.cpp b/src/plugins/platforms/offscreen/qoffscreencommon.cpp index ed1a81c2b3..a63aacdbfe 100644 --- a/src/plugins/platforms/offscreen/qoffscreencommon.cpp +++ b/src/plugins/platforms/offscreen/qoffscreencommon.cpp @@ -179,9 +179,8 @@ bool QOffscreenBackingStore::scroll(const QRegion &area, int dx, int dy) if (m_image.isNull()) return false; - const QVector rects = area.rects(); - for (int i = 0; i < rects.size(); ++i) - qt_scrollRectInImage(m_image, rects.at(i), QPoint(dx, dy)); + for (const QRect &rect : area) + qt_scrollRectInImage(m_image, rect, QPoint(dx, dy)); return true; } -- cgit v1.2.3