]> git.saurik.com Git - wxWidgets.git/commitdiff
trying optimal scrolling solution perf-wise
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 2 May 2007 14:36:59 +0000 (14:36 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 2 May 2007 14:36:59 +0000 (14:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index 4d0829742dfb89cd151a1f59d81d6bc54f09154e..5e591fe757484c51716a333a75532c57cef41d76 100644 (file)
@@ -2610,6 +2610,7 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect)
         if ( m_peer->GetNeedsDisplay() )
         {
             // because HIViewScrollRect does not scroll the already invalidated area we have two options:
+            // in case there is already a pending redraw on that area
             // either immediate redraw or full invalidate
 #if 1
             // is the better overall solution, as it does not slow down scrolling
@@ -2630,14 +2631,8 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect)
         scrollrect.Offset( -MacGetLeftBorderSize() , -MacGetTopBorderSize() ) ;
         m_peer->ScrollRect( &scrollrect , dx , dy ) ;
 
-        // becuase HIViewScrollRect does not scroll the already invalidated area we have two options
-        // either immediate redraw or full invalidate
 #if 0
-        // is the better overall solution, as it does not slow down scrolling
-        m_peer->SetNeedsDisplay() ;
-#else
         // this would be the preferred version for fast drawing controls
-
         HIViewRender(m_peer->GetControlRef()) ;
 #endif
     }