summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Loup A. Griffais <qt-project.org@plagman.net>2013-05-17 20:18:01 -0700
committerShawn Rutledge <shawn.rutledge@digia.com>2015-02-13 07:48:52 +0000
commit2b7758a8763a8fe6ca13a2f04e0137df79c849d2 (patch)
treef45ee5094423c0e12685774b8799da32efea7406
parent6555ba030a29d995b2f53814b7999b81920fa0ce (diff)
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>
-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 45cf31f104..b3bdf657e4 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);