summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-08-19 13:19:38 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-08-19 13:19:38 -0500
commitf5969e4456eccc8ed8ad4285add419c9b0eee5e1 (patch)
tree1c6d1221ae61f661733ab9f17fa9bc45d82b1ba5
parentaff903681b50e7a48a340f292c24793bdf1188e9 (diff)
downloadqt3-f5969e4456eccc8ed8ad4285add419c9b0eee5e1.tar.gz
qt3-f5969e4456eccc8ed8ad4285add419c9b0eee5e1.zip
Increase size of internal shared double buffer to accommodate larger screens more typical of modern (year 2011) systems
-rw-r--r--src/kernel/qinternal.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/kernel/qinternal.cpp b/src/kernel/qinternal.cpp
index 4289ecd..cf1e037 100644
--- a/src/kernel/qinternal.cpp
+++ b/src/kernel/qinternal.cpp
@@ -44,6 +44,11 @@
#include "qpainter.h"
#include "qcleanuphandler.h"
+// Modern systems (year 2011) have very large screens in excess of 1000 pixels wide
+// Some may even have screens in excess of 4000 pixels wide(!)
+// Prevent drawing artifacts on such screens
+#define USE_HUGE_QT_SHARED_DOUBLE_BUFFERS 1
+
static QPixmap* qdb_shared_pixmap = 0;
static QPixmap *qdb_force_pixmap = 0;
static QSharedDoubleBuffer* qdb_owner = 0;
@@ -74,10 +79,16 @@ static const int hardLimitHeight = -1;
static const int sharedLimitWidth = 64;
static const int sharedLimitHeight = 20;
#else
+#ifdef USE_HUGE_QT_SHARED_DOUBLE_BUFFERS
+// 24M on 32bpp
+static const int sharedLimitWidth = 6400;
+static const int sharedLimitHeight = 1000;
+#else
// 240K on 32bpp
static const int sharedLimitWidth = 640;
static const int sharedLimitHeight = 100;
#endif
+#endif
// *******************************************************************
// QSharedDoubleBufferCleaner declaration and implementation
@@ -527,8 +538,13 @@ QPixmap *QSharedDoubleBuffer::getPixmap()
if ( rw >= sharedLimitWidth || rh >= sharedLimitHeight ) {
if ( flags & Force ) {
+#ifdef USE_HUGE_QT_SHARED_DOUBLE_BUFFERS
+ rw = QMIN(rw, 16000);
+ rh = QMIN(rh, 16000);
+#else
rw = QMIN(rw, 8000);
rh = QMIN(rh, 8000);
+#endif
// need to create a big pixmap and start the cleaner
if ( ! qdb_force_pixmap ) {
qdb_force_pixmap = new QPixmap( rw, rh );