summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformwindow.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-02-11 11:45:58 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-13 20:40:42 +0100
commit5b422304a9b97b628dc9990fd67e2f293d535b41 (patch)
treebc7a7898b473dded6a1b5d7290e6c771ff4890a5 /src/gui/kernel/qplatformwindow.cpp
parente8ba6922c33c4844487b7eb9c7c2038ae65d4920 (diff)
Expose QPlatformWindow::invalidateSurface as a virtual function.
This can be quite useful on some embedded systems to free up graphics memory when windows are not used. QEglFSWindow already implements the function. Change-Id: I79b08efbd3c67d7be34df6a0e12dd184a92d48c5 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/gui/kernel/qplatformwindow.cpp')
-rw-r--r--src/gui/kernel/qplatformwindow.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index 2364f465b6..faaf418522 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -521,6 +521,20 @@ static inline const QScreen *effectiveScreen(const QWindow *window)
}
/*!
+ Invalidates the window's surface by releasing its surface buffers.
+
+ Many platforms do not support releasing the surface memory,
+ and the default implementation does nothing.
+
+ The platform window is expected to recreate the surface again if
+ it is needed. For instance, if an OpenGL context is made current
+ on this window.
+ */
+void QPlatformWindow::invalidateSurface()
+{
+}
+
+/*!
Helper function to get initial geometry on windowing systems which do not
do smart positioning and also do not provide a means of centering a
transient window w.r.t. its parent. For example this is useful on Windows