diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-02-27 14:34:46 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-03-02 21:01:00 +0000 |
commit | 9c1d3bc253abd4418f3050d19ec5f05bef3ada97 (patch) | |
tree | 18dfa273d29c98936114a1ced9062d7174b121ba /src/plugins/platforms/mirclient | |
parent | 9d3a41556224bb116d51fd8ee25a28317af67b22 (diff) |
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 <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/mirclient')
-rw-r--r-- | src/plugins/platforms/mirclient/qmirclientbackingstore.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/mirclient/qmirclientbackingstore.cpp b/src/plugins/platforms/mirclient/qmirclientbackingstore.cpp index daa0b229ec..c4169affdd 100644 --- a/src/plugins/platforms/mirclient/qmirclientbackingstore.cpp +++ b/src/plugins/platforms/mirclient/qmirclientbackingstore.cpp @@ -97,7 +97,7 @@ void QMirClientBackingStore::updateTexture() QRegion fixed; QRect imageRect = mImage.rect(); - Q_FOREACH (const QRect &rect, mDirty.rects()) { + for (const QRect &rect : mDirty) { // intersect with image rect to be sure QRect r = imageRect & rect; @@ -110,7 +110,7 @@ void QMirClientBackingStore::updateTexture() fixed |= r; } - Q_FOREACH (const QRect &rect, fixed.rects()) { + for (const QRect &rect : fixed) { // if the sub-rect is full-width we can pass the image data directly to // OpenGL instead of copying, since there is no gap between scanlines if (rect.width() == imageRect.width()) { |