[Libreoffice-commits] core.git: vcl/inc vcl/source

Miklos Vajna vmiklos at collabora.co.uk
Mon Aug 17 05:05:34 PDT 2015


 vcl/inc/window.h             |    2 +-
 vcl/source/window/window.cxx |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit d9e872114fcb1beedf2f068d19bd4eda1854073a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Aug 17 14:04:57 2015 +0200

    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

diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 8b5cf9c..2e56cc7 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 7dce25b..35b4f06f 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;
 }
 
 /*


More information about the Libreoffice-commits mailing list