summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2016-01-29 15:31:58 +0100
committerTor Lillqvist <tml@collabora.com>2016-02-09 08:36:01 +0000
commit8455fe462a5a0e82ed2f98d303d36623b5920f9d (patch)
treef09b0ffbe20853a101e06a614b001b12bfa828fa
parenta238b1f8d304bf1e2ffb357937f3ec888ee8ac89 (diff)
headless: don't let windows become really visible to avoid paints.
Paint at the wrong time has a habit of allocating over-large OutputDevice's for the drawing layer; saves 7Mb of heap for a dummy tilebench document. Change-Id: Ie06df705a55faadea2b06fd24b904d95ae64fd83 Reviewed-on: https://gerrit.libreoffice.org/21919 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--vcl/source/window/window.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 599514d66354..0430ffda0336 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1283,6 +1283,10 @@ SalGraphics* Window::ImplGetFrameGraphics() const
void Window::ImplSetReallyVisible()
{
+ // For now, no window is really visible in headless mode.
+ if( Application::IsHeadlessModeEnabled() )
+ return;
+
// #i43594# it is possible that INITSHOW was never send, because the visibility state changed between
// ImplCallInitShow() and ImplSetReallyVisible() when called from Show()
// mbReallyShown is a useful indicator