[Libreoffice-commits] core.git: 2 commits - svx/source vcl/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Jul 1 02:24:11 PDT 2015
svx/source/svdraw/sdrpaintwindow.cxx | 4 ++--
vcl/source/window/window.cxx | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 25ade7450ce41a46094d63123eabdf32bd68c918
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
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index b735127..c583558 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 7df3879d3f6222b840724ae748bdf8bf6a7af9f1
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
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 316bb0c..10d9e39 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3936,7 +3936,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