diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-07-01 10:44:43 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-07-01 11:22:39 +0200 |
commit | 7df3879d3f6222b840724ae748bdf8bf6a7af9f1 (patch) | |
tree | 9bf08660a03185ff12c64b0025e0597b5e8d4453 /vcl | |
parent | 3e9550e35b4e1eed4af5c6a0948bc80102aeb07d (diff) |
vcl::Window::SupportsDoubleBuffering: respect VCL_DOUBLEBUFFERING_FORCE_ENABLE
Double buffering default is false, then can be enabled on a per-widget
basis, finally this can be overriden at runtime by the
VCL_DOUBLEBUFFERING_FORCE_ENABLE environment variable (so that
everything is painted using double buffering).
Let SupportsDoubleBuffering() also respect this variable, so code
calling SupportsDoubleBuffering() can react to the runtime override,
too.
Change-Id: Ic9a1c00a801f6976069d7cfc47c3fa491ebc1ff0
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/window.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 316bb0c438a1..10d9e39d5621 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3936,7 +3936,8 @@ vcl::RenderSettings& Window::GetRenderSettings() bool Window::SupportsDoubleBuffering() const { - return mpWindowImpl->mbDoubleBuffering; + static bool bDoubleBuffering = getenv("VCL_DOUBLEBUFFERING_FORCE_ENABLE"); + return mpWindowImpl->mbDoubleBuffering || bDoubleBuffering; } void Window::SetDoubleBuffering(bool bDoubleBuffering) |