summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre-Loup A. Griffais <qt-project.org@plagman.net>2013-05-18 03:18:01 (GMT)
committerShawn Rutledge <shawn.rutledge@digia.com>2015-02-13 07:48:52 (GMT)
commit2b7758a8763a8fe6ca13a2f04e0137df79c849d2 (patch)
treef45ee5094423c0e12685774b8799da32efea7406 /src
parent6555ba030a29d995b2f53814b7999b81920fa0ce (diff)
downloadQt-2b7758a8763a8fe6ca13a2f04e0137df79c849d2.zip
Qt-2b7758a8763a8fe6ca13a2f04e0137df79c849d2.tar.gz
Qt-2b7758a8763a8fe6ca13a2f04e0137df79c849d2.tar.bz2
Don't leak RENDER Pictures in QPixmap::paintEngine().
Qt 5 doesn't use serverside pixmaps, so doesn't need this patch. Change-Id: I5ad456679efd3706582dd1e6ca8e6b4404298739 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/image/qpixmap_x11.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index 45cf31f..b3bdf65 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -2207,10 +2207,12 @@ QPaintEngine* QX11PixmapData::paintEngine() const
::Pixmap hd_copy = XCreatePixmap(X11->display, RootWindow(X11->display, xinfo.screen()),
w, h, d);
#if !defined(QT_NO_XRENDER)
- XRenderPictFormat *format = qt_renderformat_for_depth(xinfo, d);
- ::Picture picture_copy = XRenderCreatePicture(X11->display, hd_copy, format, 0, 0);
-
if (picture && d == 32) {
+ XRenderPictFormat *format = qt_renderformat_for_depth(xinfo, d);
+ ::Picture picture_copy = XRenderCreatePicture(X11->display,
+ hd_copy, format,
+ 0, 0);
+
XRenderComposite(X11->display, PictOpSrc, picture, 0, picture_copy,
0, 0, 0, 0, 0, 0, w, h);
XRenderFreePicture(X11->display, picture);