# HG changeset patch # User Chris Cannam # Date 1429541943 -3600 # Node ID 53e039d99b5df407f169e341d58cf1b28cecc7c3 # Parent 43888f891733f722f93246ba690281174fd3e6b3 Painting off-cache means we shouldn't use proxy (we aren't scaling.. yet) diff -r 43888f891733 -r 53e039d99b5d view/View.cpp --- a/view/View.cpp Mon Apr 20 14:01:39 2015 +0100 +++ b/view/View.cpp Mon Apr 20 15:59:03 2015 +0100 @@ -45,8 +45,8 @@ #include -//#define DEBUG_VIEW 1 -//#define DEBUG_VIEW_WIDGET_PAINT 1 +#define DEBUG_VIEW 1 +#define DEBUG_VIEW_WIDGET_PAINT 1 View::View(QWidget *w, bool showProgress) : @@ -1030,7 +1030,7 @@ f = getAlignedPlaybackFrame(); #ifdef DEBUG_VIEW - cerr << " -> aligned frame = " << af << endl; + cerr << " -> aligned frame = " << f << endl; #endif movePlayPointer(f); @@ -1867,6 +1867,9 @@ for (LayerList::iterator i = scrollables.begin(); i != scrollables.end(); ++i) { paint.setRenderHint(QPainter::Antialiasing, false); paint.save(); +#ifdef DEBUG_VIEW_WIDGET_PAINT + cerr << "Painting scrollable layer " << *i << " using proxy with repaintCache = " << repaintCache << ", dpratio = " << dpratio << ", rectToPaint = " << rectToPaint.x() << "," << rectToPaint.y() << " " << rectToPaint.width() << "x" << rectToPaint.height() << endl; +#endif (*i)->paint(&proxy, paint, rectToPaint); paint.restore(); } @@ -1906,7 +1909,10 @@ for (LayerList::iterator i = nonScrollables.begin(); i != nonScrollables.end(); ++i) { // Profiler profiler2("View::paintEvent non-cacheable"); - (*i)->paint(&proxy, paint, nonCacheRect); +#ifdef DEBUG_VIEW_WIDGET_PAINT + cerr << "Painting non-scrollable layer " << *i << " without proxy with repaintCache = " << repaintCache << ", dpratio = " << dpratio << ", rectToPaint = " << nonCacheRect.x() << "," << nonCacheRect.y() << " " << nonCacheRect.width() << "x" << nonCacheRect.height() << endl; +#endif + (*i)->paint(this, paint, nonCacheRect); } paint.end();