From 5b422304a9b97b628dc9990fd67e2f293d535b41 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 11 Feb 2014 11:45:58 +0100 Subject: 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 --- src/gui/kernel/qplatformwindow.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/gui/kernel/qplatformwindow.cpp') 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 @@ -520,6 +520,20 @@ static inline const QScreen *effectiveScreen(const QWindow *window) return screen; } +/*! + 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 -- cgit v1.2.3