[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: qt-copy
From: Fredrik Höglund <fredrik () kde ! org>
Date: 2009-02-23 23:04:29
Message-ID: 1235430269.404023.28642.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 930645 by fredrik:
Unapply patch 0274.
M +1 -1 patches/0274-shm-native-image-fix.diff
M +10 -0 src/gui/image/qnativeimage.cpp
M +1 -0 src/gui/image/qnativeimage_p.h
M +1 -1 src/gui/kernel/qapplication_x11.cpp
M +3 -5 src/gui/painting/qwindowsurface_raster.cpp
--- trunk/qt-copy/patches/0274-shm-native-image-fix.diff #930644:930645
@@ -1,7 +1,7 @@
qt-bugs@ issue : none
Qt Software task ID : none
bugs.kde.org number : none
-applied: yes
+applied: no
author: Fredrik Höglund <fredrik@kde.org>
This patch makes the raster graphics system use shared images instead
--- trunk/qt-copy/src/gui/image/qnativeimage.cpp #930644:930645
@@ -140,6 +140,7 @@
{
if (!X11->use_mitshm) {
xshmimg = 0;
+ xshmpm = 0;
image = QImage(width, height, format);
return;
}
@@ -183,6 +184,11 @@
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.";
+ }
}
@@ -191,6 +197,10 @@
if (!xshmimg)
return;
+ if (xshmpm) {
+ XFreePixmap(X11->display, xshmpm);
+ xshmpm = 0;
+ }
XShmDetach(X11->display, &xshminfo);
xshmimg->data = 0;
XDestroyImage(xshmimg);
--- trunk/qt-copy/src/gui/image/qnativeimage_p.h #930644:930645
@@ -85,6 +85,7 @@
#elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
XImage *xshmimg;
+ Pixmap xshmpm;
XShmSegmentInfo xshminfo;
#elif defined(Q_WS_MAC)
--- trunk/qt-copy/src/gui/kernel/qapplication_x11.cpp #930644:930645
@@ -1933,7 +1933,7 @@
&mitshm_pixmaps))
{
if (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)
- X11->use_mitshm = true;
+ X11->use_mitshm = mitshm_pixmaps;
}
#endif // QT_NO_MITSHM
--- trunk/qt-copy/src/gui/painting/qwindowsurface_raster.cpp #930644:930645
@@ -228,11 +228,9 @@
QRect br = rgn.boundingRect().translated(offset);
#ifndef QT_NO_MITSHM
- if (d_ptr->image->xshmimg) {
- const QImage &src = d->image->image;
- br = br.intersected(src.rect());
- 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);
+ 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());
XSync(X11->display, False);
} else
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic