summaryrefslogtreecommitdiff
path: root/debian/patches/0224-fast-qpixmap-fill.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0224-fast-qpixmap-fill.diff')
-rw-r--r--debian/patches/0224-fast-qpixmap-fill.diff46
1 files changed, 0 insertions, 46 deletions
diff --git a/debian/patches/0224-fast-qpixmap-fill.diff b/debian/patches/0224-fast-qpixmap-fill.diff
deleted file mode 100644
index 1fc721f..0000000
--- a/debian/patches/0224-fast-qpixmap-fill.diff
+++ /dev/null
@@ -1,46 +0,0 @@
-qt-bugs@ issue : None
-Trolltech task ID : None
-bugs.kde.org number : None
-applied: no
-author: Fredrik Höglund <fredrik@kde.org>
-
-Since there's no way to specify that a QPixmap should have an alpha channel
-when it's created, it's quite common to call pixmap.fill(Qt::transparent)
-immediately after creating it, to force Qt to recreate it with an alpha
-channel. Unfortunately QPixmap::fill() does this by creating a QImage,
-filling it with the specified color, and then converting it to a QPixmap.
-
-This patch avoids the expensive image->pixmap conversion by simply discarding
-the old pixmap, creating a new one with the correct format, and doing the
-fill server side.
-
---- a/src/gui/image/qpixmap_x11.cpp
-+++ b/src/gui/image/qpixmap_x11.cpp
-@@ -1121,7 +1121,26 @@
- {
- if (fillColor.alpha() != 255) {
- #ifndef QT_NO_XRENDER
-- if (picture && d == 32) {
-+ if (X11->use_xrender) {
-+ if (!picture || d != 32) {
-+ if (picture)
-+ XRenderFreePicture(X11->display, picture);
-+ if (mask_picture)
-+ XRenderFreePicture(X11->display, mask_picture);
-+ if (x11_mask)
-+ XFreePixmap(X11->display, x11_mask);
-+ if (hd)
-+ XFreePixmap(X11->display, hd);
-+ if (hd2)
-+ XFreePixmap(X11->display, hd2);
-+ XRenderPictFormat *format = XRenderFindStandardFormat(X11->display, PictStandardARGB32);
-+ hd = XCreatePixmap(X11->display, RootWindow(X11->display, xinfo.screen()), width(), height(), 32);
-+ picture = XRenderCreatePicture(X11->display, hd, format, 0, 0);
-+ mask_picture = 0;
-+ x11_mask = 0;
-+ hd2 = 0;
-+ d = 32;
-+ }
- ::Picture src = X11->getSolidFill(xinfo.screen(), fillColor);
- XRenderComposite(X11->display, PictOpSrc, src, 0, picture,
- 0, 0, width(), height(),