diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-08-17 14:04:57 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-08-17 14:04:57 +0200 |
commit | d9e872114fcb1beedf2f068d19bd4eda1854073a (patch) | |
tree | 0b8dc55d82247f678a96463a67f83a114ac0217a | |
parent | fe77afea53946f2869f3b6f830c8a9a1f3d2fe52 (diff) |
tdf#93482 vcl rendercontext: introduce WindowImpl::mbDoubleBufferingRequested
The intention is that currently double-buffering is either enabled
globally or not. Double-buffering is known to be working in Writer, but
not in other applications, so it would be nice if double-buffering could
be also half-enabled: only in the applications where it's known to work.
For that, we need to differentiate between "we have a buffer" (supports
double buffering) and "we want to have a buffer if possible" (double
buffering requested).
Change-Id: If48d6dc0ddf5841497e78b856d803cc8abf23ac9
-rw-r--r-- | vcl/inc/window.h | 2 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/inc/window.h b/vcl/inc/window.h index 8b5cf9cc7f39..2e56cc77e71e 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -376,7 +376,7 @@ public: mbFill:1, mbSecondary:1, mbNonHomogeneous:1, - mbDoubleBuffering:1; + mbDoubleBufferingRequested:1; vcl::RenderSettings maRenderSettings; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 7dce25b0f525..35b4f06ff738 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -757,7 +757,7 @@ WindowImpl::WindowImpl( WindowType nType ) mbFill = true; mbSecondary = false; mbNonHomogeneous = false; - mbDoubleBuffering = getenv("VCL_DOUBLEBUFFERING_FORCE_ENABLE"); // when we are not sure, assume it cannot do double-buffering via RenderContext + mbDoubleBufferingRequested = getenv("VCL_DOUBLEBUFFERING_FORCE_ENABLE"); // when we are not sure, assume it cannot do double-buffering via RenderContext } WindowImpl::~WindowImpl() @@ -1074,7 +1074,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p mpWindowImpl->mpFrameData->maResizeIdle.SetIdleHdl( LINK( this, Window, ImplHandleResizeTimerHdl ) ); mpWindowImpl->mpFrameData->maResizeIdle.SetDebugName( "vcl::Window maResizeIdle" ); mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = false; - if (!(nStyle & WB_DEFAULTWIN) && SupportsDoubleBuffering()) + if (!(nStyle & WB_DEFAULTWIN) && mpWindowImpl->mbDoubleBufferingRequested) mpWindowImpl->mpFrameData->mpBuffer = VclPtrInstance<VirtualDevice>(); mpWindowImpl->mpFrameData->mbInBufferedPaint = false; @@ -3905,7 +3905,7 @@ Any Window::GetSystemDataAny() const bool Window::SupportsDoubleBuffering() const { - return mpWindowImpl->mbDoubleBuffering; + return mpWindowImpl->mpFrameData->mpBuffer; } /* |