summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbbackingstore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbbackingstore.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index 1e046aa677..979c8142f7 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -520,16 +520,7 @@ void QXcbShmImage::setClip(const QRegion &region)
static const uint32_t values[] = { XCB_NONE };
xcb_change_gc(xcb_connection(), m_gc, mask, values);
} else {
- const QVector<QRect> qrects = region.rects();
- QVector<xcb_rectangle_t> xcb_rects(qrects.size());
-
- for (int i = 0; i < qrects.size(); i++) {
- xcb_rects[i].x = qrects[i].x();
- xcb_rects[i].y = qrects[i].y();
- xcb_rects[i].width = qrects[i].width();
- xcb_rects[i].height = qrects[i].height();
- }
-
+ const auto xcb_rects = qRegionToXcbRectangleList(region);
xcb_set_clip_rectangles(xcb_connection(),
XCB_CLIP_ORDERING_YX_BANDED,
m_gc,