Mercurial > hg > easyhg
changeset 48:996b3c4037ef
* Add IndirectPainting opt flag, makes a big difference to rendering Panner; rename project
author | Chris Cannam |
---|---|
date | Wed, 10 Nov 2010 22:07:03 +0000 |
parents | 24efab584ee5 |
children | f9b53c10a3f6 |
files | easyhg.pro hgexplorer.pro panner.cpp |
diffstat | 3 files changed, 46 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/easyhg.pro Wed Nov 10 22:07:03 2010 +0000 @@ -0,0 +1,42 @@ + +CONFIG += debug + +TEMPLATE = app +TARGET = easyhg +unix { + DESTDIR = . +} + +HEADERS = mainwindow.h \ + hgexpwidget.h \ + common.h \ + grapher.h \ + hgrunner.h \ + settingsdialog.h \ + changeset.h \ + changesetitem.h \ + logparser.h \ + panner.h \ + panned.h \ + connectionitem.h +SOURCES = main.cpp \ + mainwindow.cpp \ + hgexpwidget.cpp \ + hgrunner.cpp \ + grapher.cpp \ + settingsdialog.cpp \ + common.cpp \ + changeset.cpp \ + changesetitem.cpp \ + logparser.cpp \ + panner.cpp \ + panned.cpp \ + connectionitem.cpp + +# ! [0] +RESOURCES = hgexplorer.qrc +win32 { + RC_FILE = hgexplorer.rc +} + +QT += network opengl
--- a/hgexplorer.pro Wed Nov 10 17:30:46 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ - -CONFIG += debug - -TEMPLATE = app -TARGET = hgexplorer -unix { - DESTDIR = . -} - -HEADERS = mainwindow.h \ - hgexpwidget.h \ - common.h \ - grapher.h \ - hgrunner.h \ - settingsdialog.h \ - changeset.h \ - changesetitem.h \ - logparser.h \ - panner.h \ - panned.h \ - connectionitem.h -SOURCES = main.cpp \ - mainwindow.cpp \ - hgexpwidget.cpp \ - hgrunner.cpp \ - grapher.cpp \ - settingsdialog.cpp \ - common.cpp \ - changeset.cpp \ - changesetitem.cpp \ - logparser.cpp \ - panner.cpp \ - panned.cpp \ - connectionitem.cpp - -# ! [0] -RESOURCES = hgexplorer.qrc -win32 { - RC_FILE = hgexplorer.rc -} - -QT += network opengl
--- a/panner.cpp Wed Nov 10 17:30:46 2010 +0000 +++ b/panner.cpp Wed Nov 10 22:07:03 2010 +0000 @@ -37,7 +37,8 @@ // setViewport(new QGLWidget()); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setOptimizationFlags(QGraphicsView::DontSavePainterState); + setOptimizationFlags(QGraphicsView::DontSavePainterState | + QGraphicsView::IndirectPainting); setMouseTracking(true); setInteractive(false); } @@ -132,6 +133,8 @@ { if (m_cache.size() != viewport()->size()) { + std::cerr << "Panner: recreating cache" << std::endl; + QGraphicsScene *s = scene(); if (!s) return; PannerScene *ps = static_cast<PannerScene *>(s);