cleanup patches
This commit is contained in:
parent
73f2852e9f
commit
cb5d533c6c
@ -1,93 +0,0 @@
|
||||
From 8731ab999b849dac4716e3d29f5f55ed8e56438e Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Macieira <thiago.macieira@nokia.com>
|
||||
Date: Thu, 25 Jun 2009 13:50:29 +0200
|
||||
Subject: [PATCH 12/18] This patch makes the raster graphics system use shared images instead
|
||||
of shared pixmaps.
|
||||
|
||||
Shared memory pixmaps are deprecated since they are slower than shared
|
||||
images with modern graphics hardware. They are also not supported by EXA
|
||||
drivers and can be disabled in the latest version of the NVidia driver.
|
||||
|
||||
qt-bugs@ issue : none
|
||||
Qt Software task ID : none
|
||||
bugs.kde.org number : none
|
||||
---
|
||||
src/gui/image/qnativeimage.cpp | 10 ----------
|
||||
src/gui/image/qnativeimage_p.h | 1 -
|
||||
src/gui/painting/qwindowsurface_raster.cpp | 13 ++++++++++---
|
||||
3 files changed, 10 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
|
||||
index 3745708..3c21fce 100644
|
||||
--- a/src/gui/image/qnativeimage.cpp
|
||||
+++ b/src/gui/image/qnativeimage.cpp
|
||||
@@ -147,7 +147,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /*
|
||||
{
|
||||
if (!X11->use_mitshm) {
|
||||
xshmimg = 0;
|
||||
- xshmpm = 0;
|
||||
image = QImage(width, height, format);
|
||||
return;
|
||||
}
|
||||
@@ -191,11 +190,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /*
|
||||
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.";
|
||||
- }
|
||||
}
|
||||
|
||||
|
||||
@@ -204,10 +198,6 @@ QNativeImage::~QNativeImage()
|
||||
if (!xshmimg)
|
||||
return;
|
||||
|
||||
- if (xshmpm) {
|
||||
- XFreePixmap(X11->display, xshmpm);
|
||||
- xshmpm = 0;
|
||||
- }
|
||||
XShmDetach(X11->display, &xshminfo);
|
||||
xshmimg->data = 0;
|
||||
XDestroyImage(xshmimg);
|
||||
diff --git a/src/gui/image/qnativeimage_p.h b/src/gui/image/qnativeimage_p.h
|
||||
index 07d5dfe..ba01854 100644
|
||||
--- a/src/gui/image/qnativeimage_p.h
|
||||
+++ b/src/gui/image/qnativeimage_p.h
|
||||
@@ -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 --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
|
||||
index d6fb03b..09963d9 100644
|
||||
--- a/src/gui/painting/qwindowsurface_raster.cpp
|
||||
+++ b/src/gui/painting/qwindowsurface_raster.cpp
|
||||
@@ -220,9 +220,16 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
|
||||
|
||||
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
|
||||
--
|
||||
1.6.2.5
|
||||
|
@ -1,30 +0,0 @@
|
||||
From bb8255da422470c5012b6b1c4c24eb2afb6804dc Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Macieira <thiago.macieira@nokia.com>
|
||||
Date: Fri, 26 Jun 2009 11:41:45 +0200
|
||||
Subject: [PATCH 13/18] Restore a section of the file that got removed due to conflict resolution.
|
||||
|
||||
Thanks to Kevin Kofler for pointing this out
|
||||
---
|
||||
src/gui/kernel/qapplication_x11.cpp | 6 +++---
|
||||
1 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
|
||||
index 33aec9e..53f020b 100644
|
||||
--- a/src/gui/kernel/qapplication_x11.cpp
|
||||
+++ b/src/gui/kernel/qapplication_x11.cpp
|
||||
@@ -1955,9 +1955,9 @@ void qt_init(QApplicationPrivate *priv, int,
|
||||
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->green_mask == 0xff00
|
||||
- && defaultVisual->blue_mask == 0xff);
|
||||
+ X11->use_mitshm = defaultVisual->red_mask == 0xff0000
|
||||
+ && defaultVisual->green_mask == 0xff00
|
||||
+ && defaultVisual->blue_mask == 0xff;
|
||||
}
|
||||
}
|
||||
#endif // QT_NO_MITSHM
|
||||
--
|
||||
1.6.2.5
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 4be7acd98f49b3b1bb12c9fa5dd52b7f9ffd90fb Mon Sep 17 00:00:00 2001
|
||||
From: Dario Freddi <drf@kde.org>
|
||||
Date: Mon, 28 Sep 2009 15:58:12 +0200
|
||||
Subject: [PATCH 18/18] Fix QNativeImage constructor
|
||||
|
||||
Signed-off-by: Dario Freddi <drf@kde.org>
|
||||
---
|
||||
src/gui/image/qnativeimage.cpp | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
|
||||
index a0c86db..c1bc794 100644
|
||||
--- a/src/gui/image/qnativeimage.cpp
|
||||
+++ b/src/gui/image/qnativeimage.cpp
|
||||
@@ -144,7 +144,7 @@ QImage::Format QNativeImage::systemFormat()
|
||||
#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);
|
||||
--
|
||||
1.6.2.5
|
||||
|
88
0274-shm-native-image-fix.patch
Normal file
88
0274-shm-native-image-fix.patch
Normal file
@ -0,0 +1,88 @@
|
||||
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
|
30
qt.spec
30
qt.spec
@ -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-columns-like-this.patch
|
||||
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 and OpenGL items.
|
||||
%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@redhat.com> - 4.5.3-2
|
||||
- cleanup patches
|
||||
|
||||
* Thu Oct 01 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.5.3-1
|
||||
- qt-4.5.3
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user