diff view/View.cpp @ 951:53e039d99b5d osx-retina

Painting off-cache means we shouldn't use proxy (we aren't scaling.. yet)
author Chris Cannam
date Mon, 20 Apr 2015 15:59:03 +0100
parents 43888f891733
children b1aa74ce697e
line wrap: on
line diff
--- 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 <unistd.h>
 
-//#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();