vcl/source/window/paint.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit f3f2a4fc8565ca558d89cdf6377df7f9f8592616 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Tue Jul 7 14:11:51 2015 +0200 vcl rendercontext: avoid CopyArea() in Window::ImplScroll() Direct CopyArea() does more harm than good in case of double buffering: to avoid touching the window directly, just invalidate the whole area and avoid copying. Change-Id: I678c5b0a38fc089675fd030d2da4132684a5d6a6 diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 610575f..c8efe72 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1563,7 +1563,11 @@ void Window::ImplScroll( const Rectangle& rRect, Rectangle aDestRect( aRectMirror ); aDestRect.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll ); vcl::Region aWinInvalidateRegion( aRectMirror ); - aWinInvalidateRegion.Exclude( aDestRect ); + if (!SupportsDoubleBuffering()) + // There will be no CopyArea() call below, so invalidate the + // whole visible area, not only the smaller one that was just + // scrolled in. + aWinInvalidateRegion.Exclude(aDestRect); aInvalidateRegion.Union( aWinInvalidateRegion ); } @@ -1609,7 +1613,9 @@ void Window::ImplScroll( const Rectangle& rRect, // rendering is all there is. SalGraphics* pGraphics = ImplGetFrameGraphics(); - if ( pGraphics ) + // The invalidation area contains the area what would be copied here, + // so avoid copying in case of double buffering. + if (pGraphics && !SupportsDoubleBuffering()) { if( bReMirror ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits