[banshee/grid] [grid] massively improve rendering performance



commit de46cd884d49c77e29a4a2a921f8a0f861ee7690
Author: Aaron Bockover <abockover novell com>
Date:   Thu Jan 21 22:38:12 2010 -0500

    [grid] massively improve rendering performance
    
    While I have always oh so carefully computed proper clipping/damage
    rectangles which prevent unnecessary regions of the view being
    repainted on screen, I have never used this data to prevent walking
    the scene unnecessarily.
    
    That is, if we're not going to paint something on screen, don't
    go through the motions to lay it out in memory either.
    
    Face->Palm. Yet another thing that became more obvious and simple
    by moving to this awesome new layout system.
    
    I need to go for a beer run. Also, Sandy is a great listener.

 .../Hyena.Data.Gui/ListView/ListView_Rendering.cs  |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
index 944e256..9497ef4 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
@@ -478,6 +478,8 @@ namespace Hyena.Data.Gui
 
                 if (model_row_index < 0 || model_row_index >= Model.Count) {
                     break;
+                } else if (!layout_child.Allocation.IntersectsWith (clip)) {
+                    continue;
                 }
 
                 if (Selection != null && Selection.Contains (model_row_index)) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]