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

Tor Lillqvist tml at collabora.com
Thu Dec 17 00:41:05 PST 2015


 vcl/inc/window.h             |   17 -----------------
 vcl/source/window/paint.cxx  |   12 ++++--------
 vcl/source/window/window.cxx |    9 +++------
 3 files changed, 7 insertions(+), 31 deletions(-)

New commits:
commit 9d76a0cb7e6525d41a7e5c3c5d96e9b8a5d75603
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 17 10:31:07 2015 +0200

    Get rid of ImplDoTiledRendering()
    
    It returned true only on iOS, and we do use tiled rendering
    successfully also on the other non-DESKTOP platform, Android, plus
    obviously for LibreOffice Online and other LibreOfficeKit clients, so
    it is quite likely that the function was not really needed. Besides,
    the code doesn't even build for iOS at the moment.
    
    Change-Id: I229bce61eaab9b795a1d5e959cb6587dcedf1ef1

diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 0c097df..5d792de 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -22,8 +22,6 @@
 
 #include <sal/config.h>
 
-#include <config_features.h>
-
 #include <com/sun/star/uno/Reference.hxx>
 #include <cppuhelper/weakref.hxx>
 #include <list>
@@ -413,21 +411,6 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
                            sal_uInt16 nCode, MouseEventModifiers nMode );
 void ImplHandleResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight );
 
-inline bool ImplDoTiledRendering()
-{
-#if !HAVE_FEATURE_DESKTOP && !defined(ANDROID)
-    // We do tiled rendering only for iOS at the moment, actually, but
-    // let's see what happens if we assume it for Android, too.
-    // (That comment doesn't match what the code does, does it?)
-    return true;
-#else
-    // We need some way to know globally if this process will use
-    // tiled rendering or not. Or should this be a per-window setting?
-    // Or what?
-    return false;
-#endif
-}
-
 #endif // INCLUDED_VCL_INC_WINDOW_H
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 6402639..17e5477 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -632,14 +632,14 @@ void Window::ImplCallOverlapPaint()
 
 void Window::ImplPostPaint()
 {
-    if ( !ImplDoTiledRendering() && !mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
+    if ( !mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
         mpWindowImpl->mpFrameData->maPaintIdle.Start();
 }
 
 IMPL_LINK_NOARG_TYPED(Window, ImplHandlePaintHdl, Idle *, void)
 {
     // save paint events until layout is done
-    if (!ImplDoTiledRendering() && IsSystemWindow() && static_cast<const SystemWindow*>(this)->hasPendingLayout())
+    if (IsSystemWindow() && static_cast<const SystemWindow*>(this)->hasPendingLayout())
     {
         mpWindowImpl->mpFrameData->maPaintIdle.Start();
         return;
@@ -648,7 +648,7 @@ IMPL_LINK_NOARG_TYPED(Window, ImplHandlePaintHdl, Idle *, void)
     OutputDevice::PaintScope aScope(this);
 
     // save paint events until resizing or initial sizing done
-    if (!ImplDoTiledRendering() && mpWindowImpl->mbFrame &&
+    if (mpWindowImpl->mbFrame &&
         (mpWindowImpl->mpFrameData->maResizeIdle.IsActive() ||
          mpWindowImpl->mpFrame->PaintsBlocked()))
     {
@@ -667,11 +667,7 @@ IMPL_LINK_NOARG_TYPED(Window, ImplHandleResizeTimerHdl, Idle *, void)
         OutputDevice::PaintScope aScope(this);
 
         ImplCallResize();
-        if( ImplDoTiledRendering() )
-        {
-            ImplHandlePaintHdl(nullptr);
-        }
-        else if( mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
+        if( mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
         {
             mpWindowImpl->mpFrameData->maPaintIdle.Stop();
             mpWindowImpl->mpFrameData->maPaintIdle.GetIdleHdl().Call( nullptr );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index b508ed4..edbdbdd 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1064,12 +1064,9 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
         mpWindowImpl->mpFrameData->mbInSysObjFocusHdl = false;
         mpWindowImpl->mpFrameData->mbInSysObjToTopHdl = false;
         mpWindowImpl->mpFrameData->mbSysObjFocus      = false;
-        if (!ImplDoTiledRendering())
-        {
-            mpWindowImpl->mpFrameData->maPaintIdle.SetPriority( SchedulerPriority::REPAINT );
-            mpWindowImpl->mpFrameData->maPaintIdle.SetIdleHdl( LINK( this, Window, ImplHandlePaintHdl ) );
-            mpWindowImpl->mpFrameData->maPaintIdle.SetDebugName( "vcl::Window maPaintIdle" );
-        }
+        mpWindowImpl->mpFrameData->maPaintIdle.SetPriority( SchedulerPriority::REPAINT );
+        mpWindowImpl->mpFrameData->maPaintIdle.SetIdleHdl( LINK( this, Window, ImplHandlePaintHdl ) );
+        mpWindowImpl->mpFrameData->maPaintIdle.SetDebugName( "vcl::Window maPaintIdle" );
         mpWindowImpl->mpFrameData->maResizeIdle.SetPriority( SchedulerPriority::RESIZE );
         mpWindowImpl->mpFrameData->maResizeIdle.SetIdleHdl( LINK( this, Window, ImplHandleResizeTimerHdl ) );
         mpWindowImpl->mpFrameData->maResizeIdle.SetDebugName( "vcl::Window maResizeIdle" );


More information about the Libreoffice-commits mailing list