summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_p.h
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-09-07 08:58:31 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-09-08 16:36:15 (GMT)
commit4feed48fdd738ed99cba86a4214e238a3e7275ed (patch)
treea9b3b41bc838275d56914b7f0d22e739794ae3c4 /src/opengl/qgl_p.h
parente8b5bfa8a86b2d7c79aabcc4566f740f0a9afe7c (diff)
downloadQt-4feed48fdd738ed99cba86a4214e238a3e7275ed.zip
Qt-4feed48fdd738ed99cba86a4214e238a3e7275ed.tar.gz
Qt-4feed48fdd738ed99cba86a4214e238a3e7275ed.tar.bz2
Move buffer clear out of the paint engine and into the QGLPaintDevices
Previously, the paint engine cleared the surface's buffers in begin. This logic really belongs in QGLPaintDevice::beginPaint as not all paint devices will want this behaviour (in fact most don't). This also makes QGLPaintDevice API much simpler as the virtual getters for the clear color, etc. can be removed. It's much cleaner this way. The only possible problem is with the GL1 engine, which also cleared the accumulation & depth buffers in begin. However, the engine will also clear the depth buffer later as part of it's clipping logic. It also doesn't use the accumulation buffer, so clearing it seems unnessisary.
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r--src/opengl/qgl_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 03532c8..e86b843 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -175,6 +175,7 @@ class QGLWidgetPrivate : public QWidgetPrivate
Q_DECLARE_PUBLIC(QGLWidget)
public:
QGLWidgetPrivate() : QWidgetPrivate()
+ , disable_clear_on_painter_begin(false)
#ifdef Q_WS_QWS
, wsurf(0)
#endif
@@ -197,6 +198,8 @@ public:
QGLColormap cmap;
QMap<QString, int> displayListCache;
+ bool disable_clear_on_painter_begin;
+
#if defined(Q_WS_WIN)
void updateColormap();
QGLContext *olcx;
@@ -295,7 +298,6 @@ public:
uint sharing : 1;
uint initDone : 1;
uint crWin : 1;
- uint clear_on_painter_begin : 1;
uint internal_context : 1;
uint version_flags_cached : 1;
QPaintDevice *paintDevice;