diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-07-01 10:44:43 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-06 12:52:52 +0200 |
commit | 84f4d6aad770a5bfe0c21aa6c5a0180aa59ec740 (patch) | |
tree | 88a8e3185bf273cd551d84257725a0ea7396094f /vcl | |
parent | ac903bc33c9318dd0b815395512eabb6fb172f71 (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
(cherry picked from commit 7df3879d3f6222b840724ae748bdf8bf6a7af9f1)
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 757b2d154c65..372ea7d05d83 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3943,7 +3943,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) |