rpms/qt/devel 0274-shm-native-image-fix.patch, NONE, 1.1 qt.spec, 1.336, 1.337 0012-This-patch-makes-the-raster-graphics-system-use-shar.patch, 1.1, NONE 0013-Restore-a-section-of-the-file-that-got-removed-due-t.patch, 1.1, NONE 0018-Fix-QNativeImage-constructor.patch, 1.1, NONE

Than Ngo than at fedoraproject.org
Fri Oct 2 16:55:36 UTC 2009


Author: than

Update of /cvs/extras/rpms/qt/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8394

Modified Files:
	qt.spec 
Added Files:
	0274-shm-native-image-fix.patch 
Removed Files:
	0012-This-patch-makes-the-raster-graphics-system-use-shar.patch 
	0013-Restore-a-section-of-the-file-that-got-removed-due-t.patch 
	0018-Fix-QNativeImage-constructor.patch 
Log Message:
cleanup patches


0274-shm-native-image-fix.patch:
 image/qnativeimage.cpp             |   11 +----------
 image/qnativeimage_p.h             |    1 -
 kernel/qapplication_x11.cpp        |    9 +++------
 painting/qwindowsurface_raster.cpp |   13 ++++++++++---
 4 files changed, 14 insertions(+), 20 deletions(-)

--- NEW FILE 0274-shm-native-image-fix.patch ---
diff -up qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage.cpp.me qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage.cpp
--- qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage.cpp.me	2009-10-02 18:26:02.000000000 +0200
+++ qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage.cpp	2009-10-02 18:27:13.000000000 +0200
@@ -144,7 +144,7 @@ QImage::Format QNativeImage::systemForma
 #elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
 
 QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* isTextBuffer */, QWidget *widget)
-    : xshmimg(0), xshmpm(0)
+    : xshmimg(0)
 {
     if (!X11->use_mitshm) {
         image = QImage(width, height, format);
@@ -195,11 +195,6 @@ QNativeImage::QNativeImage(int width, in
             shmctl(xshminfo.shmid, IPC_RMID, 0);
         return;
     }
-    xshmpm = XShmCreatePixmap(X11->display, DefaultRootWindow(X11->display), xshmimg->data,
-                              &xshminfo, width, height, dd);
-    if (!xshmpm) {
-        qWarning() << "QNativeImage: Unable to create shared Pixmap.";
-    }
 }
 
 
@@ -208,10 +203,6 @@ QNativeImage::~QNativeImage()
     if (!xshmimg)
         return;
 
-    if (xshmpm) {
-        XFreePixmap(X11->display, xshmpm);
-        xshmpm = 0;
-    }
     XShmDetach(X11->display, &xshminfo);
     xshmimg->data = 0;
     XDestroyImage(xshmimg);
diff -up qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage_p.h.me qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage_p.h
--- qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage_p.h.me	2009-10-02 18:33:38.000000000 +0200
+++ qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage_p.h	2009-10-02 18:34:01.000000000 +0200
@@ -90,7 +90,6 @@ public:
 
 #elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
     XImage *xshmimg;
-    Pixmap xshmpm;
     XShmSegmentInfo xshminfo;
 
 #elif defined(Q_WS_MAC)
diff -up qt-x11-opensource-src-4.5.3/src/gui/kernel/qapplication_x11.cpp.me qt-x11-opensource-src-4.5.3/src/gui/kernel/qapplication_x11.cpp
--- qt-x11-opensource-src-4.5.3/src/gui/kernel/qapplication_x11.cpp.me	2009-10-02 18:27:55.000000000 +0200
+++ qt-x11-opensource-src-4.5.3/src/gui/kernel/qapplication_x11.cpp	2009-10-02 18:33:30.000000000 +0200
@@ -1959,12 +1959,9 @@ void qt_init(QApplicationPrivate *priv, 
             bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0;
             if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) {
                 Visual *defaultVisual = DefaultVisual(X11->display, DefaultScreen(X11->display));
-                X11->use_mitshm = mitshm_pixmaps && ((defaultVisual->red_mask == 0xff0000
-                                                      || defaultVisual->red_mask == 0xf800)
-                                                     && (defaultVisual->green_mask == 0xff00
-                                                         || defaultVisual->green_mask == 0x7e0)
-                                                     && (defaultVisual->blue_mask == 0xff
-                                                         || defaultVisual->blue_mask == 0x1f));
+                X11->use_mitshm = (defaultVisual->red_mask == 0xff0000 || defaultVisual->red_mask == 0xf800)
+                                   && (defaultVisual->green_mask == 0xff00 || defaultVisual->green_mask == 0x7e0)
+                                   && (defaultVisual->blue_mask == 0xff || defaultVisual->blue_mask == 0x1f);
             }
         }
 #endif // QT_NO_MITSHM
diff -up qt-x11-opensource-src-4.5.3/src/gui/painting/qwindowsurface_raster.cpp.me qt-x11-opensource-src-4.5.3/src/gui/painting/qwindowsurface_raster.cpp
--- qt-x11-opensource-src-4.5.3/src/gui/painting/qwindowsurface_raster.cpp.me	2009-10-02 18:34:18.000000000 +0200
+++ qt-x11-opensource-src-4.5.3/src/gui/painting/qwindowsurface_raster.cpp	2009-10-02 18:35:54.000000000 +0200
@@ -220,9 +220,16 @@ void QRasterWindowSurface::flush(QWidget
 
     QRect br = rgn.boundingRect().translated(offset);
 #ifndef QT_NO_MITSHM
-    if (d_ptr->image->xshmpm) {
-        XCopyArea(X11->display, d_ptr->image->xshmpm, widget->handle(), d_ptr->gc,
-                  br.x(), br.y(), br.width(), br.height(), wbr.x(), wbr.y());
+    if (d_ptr->image->xshmimg && (br.width() * br.height() > 65536)) {
+        const QImage &src = d->image->image;
+        br = br.intersected(src.rect());
+        // Hack to make sure we satisify the PutImage() constraints in the X server,
+        // since the doShmPutImage() route currently forces a migration to system ram.
+        wbr.setX(wbr.x() - br.x());
+        br.setX(0);
+        br.setWidth(src.width());
+        XShmPutImage(X11->display, widget->handle(), d_ptr->gc, d_ptr->image->xshmimg,
+                     br.x(), br.y(), wbr.x(), wbr.y(), br.width(), br.height(), False);
         XSync(X11->display, False);
     } else
 #endif


Index: qt.spec
===================================================================
RCS file: /cvs/extras/rpms/qt/devel/qt.spec,v
retrieving revision 1.336
retrieving revision 1.337
diff -u -p -r1.336 -r1.337
--- qt.spec	2 Oct 2009 15:30:48 -0000	1.336
+++ qt.spec	2 Oct 2009 16:55:36 -0000	1.337
@@ -10,7 +10,7 @@ Summary: Qt toolkit
 Name:    qt
 Epoch:   1
 Version: 4.5.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
 License: LGPLv2 with exceptions or GPLv3 with exceptions
@@ -69,13 +69,10 @@ Patch208: 0008-In-a-treeview-with-column
 Patch209: 0009-This-patch-fixes-deserialization-of-values-with-cust.patch
 Patch210: 0010-Import-README.qt-copy-from-the-original-qt-copy.patch
 Patch211: 0011-Update-this-file-to-reflect-the-workflow-with-Git-a.patch
-Patch212: 0012-This-patch-makes-the-raster-graphics-system-use-shar.patch
-Patch213: 0013-Restore-a-section-of-the-file-that-got-removed-due-t.patch
-Patch214: 0014-Fix-error-line-not-to-have-a-as-it-s-not-correct.patch
-Patch215: 0015-Make-QMenu-respect-the-minimum-width-set.patch
-Patch216: 0016-Fill-gap-of-X.org-XFree-multimedia-special-launcher.patch
-Patch217: 0017-Add-context-to-tr-calls-in-QShortcut.patch
-Patch218: 0018-Fix-QNativeImage-constructor.patch
+Patch212: 0274-shm-native-image-fix.patch
+Patch213: 0015-Make-QMenu-respect-the-minimum-width-set.patch
+Patch214: 0016-Fill-gap-of-X.org-XFree-multimedia-special-launcher.patch
+Patch215: 0017-Add-context-to-tr-calls-in-QShortcut.patch
 
 # these patches are not merged yet in kde-qt branches
 Patch301: 0118-qtcopy-define.diff
@@ -391,16 +388,10 @@ Qt libraries used for drawing widgets an
 %patch209 -p1 -b .kde-qt-0009
 %patch210 -p1 -b .kde-qt-0010
 %patch211 -p1 -b .kde-qt-0011
-## doesn't apply (looks mostly harmless, affects -raster engine)
-#patch212 -p1 -b .kde-qt-0012
-## doesn't apply (Kevin?)
-#patch213 -p1 -b .kde-qt-0013
-## upstreamed already?
-#patch214 -p1 -b .kde-qt-0014
-%patch215 -p1 -b .kde-qt-0015
-%patch216 -p1 -b .kde-qt-0016
-%patch217 -p1 -b .kde-qt-0017
-%patch218 -p1 -b .kde-qt-0018
+%patch212 -p1 -b .0274-shm-native-image-fix
+%patch214 -p1 -b .kde-qt-0015
+%patch215 -p1 -b .kde-qt-0016
+%patch216 -p1 -b .kde-qt-0017
 
 # not yet merged ones
 %patch301 -p0 -b .0118-qtcopy-define
@@ -965,6 +956,9 @@ fi
 
 
 %changelog
+* Fri Oct 02 2009 Than Ngo <than at redhat.com> - 4.5.3-2
+- cleanup patches
+
 * Thu Oct 01 2009 Rex Dieter <rdieter at fedoraproject.org> - 4.5.3-1
 - qt-4.5.3
 


--- 0012-This-patch-makes-the-raster-graphics-system-use-shar.patch DELETED ---


--- 0013-Restore-a-section-of-the-file-that-got-removed-due-t.patch DELETED ---


--- 0018-Fix-QNativeImage-constructor.patch DELETED ---




More information about the fedora-extras-commits mailing list