From 7b37d1bc4f6b27188b0688dcdc2b89db3101575c Mon Sep 17 00:00:00 2001 From: Fathi Boudra Date: Fri, 20 Feb 2009 20:24:25 +0000 Subject: Merge Qt4 4.5 branch to trunk. --- debian/patches/0224-fast-qpixmap-fill.diff | 46 ------------------------------ 1 file changed, 46 deletions(-) delete mode 100644 debian/patches/0224-fast-qpixmap-fill.diff (limited to 'debian/patches/0224-fast-qpixmap-fill.diff') 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 - -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(), -- cgit v1.2.3