summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-07-01 10:44:43 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-07-02 10:58:46 +0200
commitbe8bf4b6cb6288161be0d2f63207711b002a36e5 (patch)
treef9125db775ba863ed6991fb5ac04a99ebe3a5562 /vcl/source
parent2b62e2ea02ca7bee6688b0dacd51fa75fdd42a2c (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/source')
-rw-r--r--vcl/source/window/window.cxx3
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)