[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-22 22:28:06
Message-ID: 1235341686.942835.9156.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 930259 by fredrik:
Fix the XShm usage in the raster graphics system.
A patches/0274-shm-native-image-fix.diff
M +1 -1 patches/README
M +0 -10 src/gui/image/qnativeimage.cpp
M +0 -1 src/gui/image/qnativeimage_p.h
M +1 -1 src/gui/kernel/qapplication_x11.cpp
M +5 -3 src/gui/painting/qwindowsurface_raster.cpp
--- trunk/qt-copy/patches/README #930258:930259
@@ -1,5 +1,5 @@
Please assign the numbers incrementally, and don't reuse them. The next one:
-#0274
+#0275
This directory contains patches for Qt that haven't been accepted by TrollTech
yet. All patches in this directory itself shouldn't make qt-copy incompatible
--- trunk/qt-copy/src/gui/image/qnativeimage.cpp #930258:930259
@@ -140,7 +140,6 @@
{
if (!X11->use_mitshm) {
xshmimg = 0;
- xshmpm = 0;
image = QImage(width, height, format);
return;
}
@@ -184,11 +183,6 @@
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.";
- }
}
@@ -197,10 +191,6 @@
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 #930258:930259
@@ -85,7 +85,6 @@
#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 #930258:930259
@@ -1933,7 +1933,7 @@
&mitshm_pixmaps))
{
if (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)
- X11->use_mitshm = mitshm_pixmaps;
+ X11->use_mitshm = true;
}
#endif // QT_NO_MITSHM
--- trunk/qt-copy/src/gui/painting/qwindowsurface_raster.cpp #930258:930259
@@ -228,9 +228,11 @@
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) {
+ 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);
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