[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - 2 commits - svx/source vcl/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Jul 2 01:59:33 PDT 2015


 svx/source/svdraw/sdrpaintwindow.cxx |    4 ++--
 vcl/source/window/window.cxx         |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 08c6d3b1805e06165a85b7861c61a0c662cc8c31
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jul 1 10:55:37 2015 +0200

    SdrPaintWindow: no own buffer for rendercontext-enabled vcl::Windows
    
    The buffered overlay manager paints using a timer, which is problematic
    if the given vcl::Window already supports double-buffering itself, so
    always use direct (to the rendercontext) painting in that case.
    
    Change-Id: I93144c02814fd511f333224ab058374c7da369f0
    (cherry picked from commit 25ade7450ce41a46094d63123eabdf32bd68c918)

diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index e75acd8..d8f0c03 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -201,8 +201,9 @@ void SdrPaintWindow::impCreateOverlayManager()
         // is it a window?
         if(OUTDEV_WINDOW == GetOutputDevice().GetOutDevType())
         {
+            vcl::Window* pWindow = dynamic_cast<vcl::Window*>(&GetOutputDevice());
             // decide which OverlayManager to use
-            if(GetPaintView().IsBufferedOverlayAllowed() && mbUseBuffer)
+            if(GetPaintView().IsBufferedOverlayAllowed() && mbUseBuffer && !pWindow->SupportsDoubleBuffering())
             {
                 // buffered OverlayManager, buffers its background and refreshes from there
                 // for pure overlay changes (no system redraw). The 3rd parameter specifies
@@ -225,7 +226,6 @@ void SdrPaintWindow::impCreateOverlayManager()
             // Request a repaint so that the buffered overlay manager fills
             // its buffer properly.  This is a workaround for missing buffer
             // updates.
-            vcl::Window* pWindow = dynamic_cast<vcl::Window*>(&GetOutputDevice());
             if (pWindow != NULL)
                 pWindow->Invalidate();
 
commit be8bf4b6cb6288161be0d2f63207711b002a36e5
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jul 1 10:44:43 2015 +0200

    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)

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 757b2d1..372ea7d 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)


More information about the Libreoffice-commits mailing list