# HG changeset patch # User Chris Cannam # Date 1289426823 0 # Node ID 996b3c4037ef174096734e69f795b02e189a2b1c # Parent 24efab584ee5c80de620774eb189585cf6ec8cf2 * Add IndirectPainting opt flag, makes a big difference to rendering Panner; rename project diff -r 24efab584ee5 -r 996b3c4037ef easyhg.pro --- /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 diff -r 24efab584ee5 -r 996b3c4037ef hgexplorer.pro --- 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 diff -r 24efab584ee5 -r 996b3c4037ef panner.cpp --- 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(s);