diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-05-29 14:05:55 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:30:09 (GMT) |
commit | d705abe962e309318ecad45064cbf61a2ffc79e2 (patch) | |
tree | c3e6f091b955615afe757cdb45d0daf9ae0863d1 /src/gui/graphicsview/qgraphicsview.cpp | |
parent | e5ffaeb4bc9b76a96fdddb31460d4acdc564ae3c (diff) | |
download | Qt-d705abe962e309318ecad45064cbf61a2ffc79e2.zip Qt-d705abe962e309318ecad45064cbf61a2ffc79e2.tar.gz Qt-d705abe962e309318ecad45064cbf61a2ffc79e2.tar.bz2 |
Experimental change: replace all updates with repaints.
This seems to be the only way to get a high frame rate, regardless
of the performance of painting and all.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsview.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsview.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 354feae..e205985 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -815,11 +815,11 @@ void QGraphicsViewPrivate::processPendingUpdates() if (viewportUpdateMode == QGraphicsView::BoundingRectViewportUpdate) { if (optimizationFlags & QGraphicsView::DontAdjustForAntialiasing) - viewport->update(dirtyBoundingRect); + viewport->repaint(dirtyBoundingRect); else - viewport->update(dirtyBoundingRect.adjusted(-2, -2, 2, 2)); + viewport->repaint(dirtyBoundingRect.adjusted(-2, -2, 2, 2)); } else { - viewport->update(dirtyRegion); // Already adjusted in updateRect/Region. + viewport->repaint(dirtyRegion); // Already adjusted in updateRect/Region. } dirtyBoundingRect = QRect(); @@ -829,7 +829,7 @@ void QGraphicsViewPrivate::processPendingUpdates() void QGraphicsViewPrivate::updateAll() { Q_Q(QGraphicsView); - q->viewport()->update(); + q->viewport()->repaint(); fullUpdatePending = true; dirtyBoundingRect = QRect(); dirtyRegion = QRegion(); @@ -846,13 +846,13 @@ void QGraphicsViewPrivate::updateRegion(const QRegion &r) switch (viewportUpdateMode) { case QGraphicsView::FullViewportUpdate: fullUpdatePending = true; - q->viewport()->update(); + q->viewport()->repaint(); break; case QGraphicsView::BoundingRectViewportUpdate: dirtyBoundingRect |= r.boundingRect(); if (dirtyBoundingRect.contains(q->viewport()->rect())) { fullUpdatePending = true; - q->viewport()->update(); + q->viewport()->repaint(); } break; case QGraphicsView::SmartViewportUpdate: // ### DEPRECATE @@ -882,13 +882,13 @@ void QGraphicsViewPrivate::updateRect(const QRect &r) switch (viewportUpdateMode) { case QGraphicsView::FullViewportUpdate: fullUpdatePending = true; - q->viewport()->update(); + q->viewport()->repaint(); break; case QGraphicsView::BoundingRectViewportUpdate: dirtyBoundingRect |= r; if (dirtyBoundingRect.contains(q->viewport()->rect())) { fullUpdatePending = true; - q->viewport()->update(); + q->viewport()->repaint(); } break; case QGraphicsView::SmartViewportUpdate: // ### DEPRECATE |