Diffstat (limited to 'qt/qt-2.3.7.patch/qte237-iconviewspeed.patch') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qt/qt-2.3.7.patch/qte237-iconviewspeed.patch | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch b/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch index 63e45ec..81064e1 100644 --- a/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch +++ b/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch | |||
@@ -1,69 +1,62 @@ | |||
1 | Speed up patches backported from | 1 | Speed up patches backported from |
2 | 2 | ||
3 | http://robotics.dei.unipd.it/~koral/KDE/kflicker.html | 3 | http://robotics.dei.unipd.it/~koral/KDE/kflicker.html |
4 | 4 | ||
5 | and | 5 | and |
6 | 6 | ||
7 | http://lists.kde.org/?l=kde-optimize&m=105382164111363&w=2 (complete thread) | 7 | http://lists.kde.org/?l=kde-optimize&m=105382164111363&w=2 (complete thread) |
8 | 8 | ||
9 | 9 | ||
10 | 10 | ||
11 | 11 | ||
12 | diff -u qt-2.3.7_old/src/iconview/qiconview.cpp qt-2.3.7/src/iconview/qiconview.cpp | 12 | diff -u qt-2.3.7_old/src/iconview/qiconview.cpp qt-2.3.7/src/iconview/qiconview.cpp |
13 | --- qt-2.3.7_old/src/iconview/qiconview.cpp2004-06-13 22:29:56.000000000 +0200 | 13 | --- qt-2.3.7_old/src/iconview/qiconview.cpp2004-06-13 22:29:56.000000000 +0200 |
14 | +++ qt-2.3.7/src/iconview/qiconview.cpp2004-06-13 22:33:32.000000000 +0200 | 14 | +++ qt-2.3.7/src/iconview/qiconview.cpp2004-06-13 22:33:32.000000000 +0200 |
15 | @@ -1,5 +1,5 @@ | ||
16 | /**************************************************************************** | ||
17 | -** $Id$ | ||
18 | +** $Id$ | ||
19 | ** | ||
20 | ** Implementation of QIconView widget class | ||
21 | ** | ||
22 | @@ -220,6 +220,7 @@ | 15 | @@ -220,6 +220,7 @@ |
23 | QIconView::SelectionMode selectionMode; | 16 | QIconView::SelectionMode selectionMode; |
24 | QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; | 17 | QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; |
25 | QRect *rubber; | 18 | QRect *rubber; |
26 | + QPixmap *backBuffer; | 19 | + QPixmap *backBuffer; |
27 | QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, | 20 | QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, |
28 | *fullRedrawTimer; | 21 | *fullRedrawTimer; |
29 | int rastX, rastY, spacing; | 22 | int rastX, rastY, spacing; |
30 | @@ -2263,6 +2264,7 @@ | 23 | @@ -2263,6 +2264,7 @@ |
31 | d->currentItem = 0; | 24 | d->currentItem = 0; |
32 | d->highlightedItem = 0; | 25 | d->highlightedItem = 0; |
33 | d->rubber = 0; | 26 | d->rubber = 0; |
34 | + d->backBuffer = 0; | 27 | + d->backBuffer = 0; |
35 | d->scrollTimer = 0; | 28 | d->scrollTimer = 0; |
36 | d->startDragItem = 0; | 29 | d->startDragItem = 0; |
37 | d->tmpCurrentItem = 0; | 30 | d->tmpCurrentItem = 0; |
38 | @@ -2411,6 +2413,8 @@ | 31 | @@ -2411,6 +2413,8 @@ |
39 | delete item; | 32 | delete item; |
40 | item = tmp; | 33 | item = tmp; |
41 | } | 34 | } |
42 | + delete d->backBuffer; | 35 | + delete d->backBuffer; |
43 | + d->backBuffer = 0; | 36 | + d->backBuffer = 0; |
44 | delete d->fm; | 37 | delete d->fm; |
45 | d->fm = 0; | 38 | d->fm = 0; |
46 | #ifndef QT_NO_TOOLTIP | 39 | #ifndef QT_NO_TOOLTIP |
47 | @@ -2877,6 +2881,48 @@ | 40 | @@ -2877,6 +2881,48 @@ |
48 | } | 41 | } |
49 | 42 | ||
50 | /*! | 43 | /*! |
51 | + This function grabs all paintevents that otherwise would have been | 44 | + This function grabs all paintevents that otherwise would have been |
52 | + processed by the QScrollView::viewportPaintEvent(). Here we use a | 45 | + processed by the QScrollView::viewportPaintEvent(). Here we use a |
53 | + doublebuffer to reduce 'on-paint' flickering on QIconView | 46 | + doublebuffer to reduce 'on-paint' flickering on QIconView |
54 | + (and of course its childs). | 47 | + (and of course its childs). |
55 | + | 48 | + |
56 | + \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() | 49 | + \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() |
57 | +*/ | 50 | +*/ |
58 | + | 51 | + |
59 | +void QIconView::bufferedPaintEvent( QPaintEvent* pe ) | 52 | +void QIconView::bufferedPaintEvent( QPaintEvent* pe ) |
60 | +{ | 53 | +{ |
61 | + QWidget* vp = viewport(); | 54 | + QWidget* vp = viewport(); |
62 | + QRect r = pe->rect() & vp->rect(); | 55 | + QRect r = pe->rect() & vp->rect(); |
63 | + int ex = r.x() + contentsX(); | 56 | + int ex = r.x() + contentsX(); |
64 | + int ey = r.y() + contentsY(); | 57 | + int ey = r.y() + contentsY(); |
65 | + int ew = r.width(); | 58 | + int ew = r.width(); |
66 | + int eh = r.height(); | 59 | + int eh = r.height(); |
67 | + | 60 | + |
68 | + if ( !d->backBuffer ) | 61 | + if ( !d->backBuffer ) |
69 | +d->backBuffer = new QPixmap(vp->size()); | 62 | +d->backBuffer = new QPixmap(vp->size()); |