summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorArmin Berres <armin.berres@basyskom.de>2011-03-16 07:23:57 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-03-16 07:23:57 (GMT)
commitf673f4c8273bcdde76b36cb58cb7b5e46a87f1ac (patch)
tree913e5598a782d0f22cc4752a789d0f43bb3caa65 /src/opengl
parent81ce61c9459c85f53486e668b532fe43a4d40ff0 (diff)
downloadQt-f673f4c8273bcdde76b36cb58cb7b5e46a87f1ac.zip
Qt-f673f4c8273bcdde76b36cb58cb7b5e46a87f1ac.tar.gz
Qt-f673f4c8273bcdde76b36cb58cb7b5e46a87f1ac.tar.bz2
Make getters for staticContentsSupport and partialUpdateSupport virtual
When QRuntimeGraphicsSystem is asked for its support for static contents of partial updates it should return the value for the currently running wrapped graphicssystem. As the getters have not been virtual so far this could not be implemented. Additionally the setters have been removed as these values are not supposed to be set from the outside. Only the graphicssystems itself knows what it supports. If the default values should be changed the methods should be overwritten. Merge-request: 1136 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qwindowsurface_gl.cpp14
-rw-r--r--src/opengl/qwindowsurface_gl_p.h2
2 files changed, 13 insertions, 3 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 21b2f09..ea1f765 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -299,6 +299,8 @@ struct QGLWindowSurfacePrivate
QList<QImage> buffers;
QGLWindowSurfaceGLPaintDevice glDevice;
QGLWindowSurface* q_ptr;
+
+ bool partialUpdateSupport;
};
QGLFormat QGLWindowSurface::surfaceFormat;
@@ -351,6 +353,7 @@ QGLWindowSurface::QGLWindowSurface(QWidget *window)
d_ptr->q_ptr = this;
d_ptr->geometry_updated = false;
d_ptr->did_paint = false;
+ d_ptr->partialUpdateSupport = false;
}
QGLWindowSurface::~QGLWindowSurface()
@@ -429,11 +432,11 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
if (ctx->d_func()->eglContext->configAttrib(EGL_SWAP_BEHAVIOR) != EGL_BUFFER_PRESERVED &&
! haveNOKSwapRegion)
- setPartialUpdateSupport(false); // Force full-screen updates
+ d_ptr->partialUpdateSupport = false; // Force full-screen updates
else
- setPartialUpdateSupport(true);
+ d_ptr->partialUpdateSupport = true;
#else
- setPartialUpdateSupport(false);
+ d_ptr->partialUpdateSupport = false;
#endif
widgetPrivate->extraData()->glContext = ctx;
@@ -1081,6 +1084,11 @@ QImage *QGLWindowSurface::buffer(const QWidget *widget)
return &d_ptr->buffers.last();
}
+bool QGLWindowSurface::hasPartialUpdateSupport() const
+{
+ return d_ptr->partialUpdateSupport;
+}
+
QT_END_NAMESPACE
diff --git a/src/opengl/qwindowsurface_gl_p.h b/src/opengl/qwindowsurface_gl_p.h
index 67f9f41..e1689bf 100644
--- a/src/opengl/qwindowsurface_gl_p.h
+++ b/src/opengl/qwindowsurface_gl_p.h
@@ -108,6 +108,8 @@ public:
QImage *buffer(const QWidget *widget);
+ bool hasPartialUpdateSupport() const;
+
QGLContext *context() const;
static QGLFormat surfaceFormat;