[maemo-commits] [maemo-commits] r17052 - in projects/haf/trunk/libmatchbox2: . matchbox/comp-mgr

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Jan 2 17:41:42 EET 2009
Author: kihamala
Date: 2009-01-02 17:41:41 +0200 (Fri, 02 Jan 2009)
New Revision: 17052

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
Log:
update whole bounding box if there are lot of areas to update


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-01-02 13:28:26 UTC (rev 17051)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-01-02 15:41:41 UTC (rev 17052)
@@ -1,3 +1,10 @@
+2009-01-02  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
+
+	* matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
+	(mb_wm_comp_mgr_clutter_client_repair_real): Optimisation for file
+	manager like applications. Update the whole bounding box if there are
+	three or more damaged areas. (The threshold value may need adjusting.)
+
 2008-12-16  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
 
 	Release 0.2.12

Modified: projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c	2009-01-02 13:28:26 UTC (rev 17051)
+++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c	2009-01-02 15:41:41 UTC (rev 17052)
@@ -91,7 +91,8 @@
 mb_wm_comp_mgr_clutter_client_hide_real (MBWMCompMgrClient * client);
 
 static void
-mb_wm_comp_mgr_clutter_client_repair_real (MBWMCompMgrClient * client, Damage damage);
+mb_wm_comp_mgr_clutter_client_repair_real (MBWMCompMgrClient *client,
+                                           Damage damage);
 
 static void
 mb_wm_comp_mgr_clutter_client_configure_real (MBWMCompMgrClient * client);
@@ -747,8 +748,8 @@
 }
 
 static void
-mb_wm_comp_mgr_clutter_client_repair_real (
-    MBWMCompMgrClient * client, Damage damage)
+mb_wm_comp_mgr_clutter_client_repair_real (MBWMCompMgrClient *client,
+                                           Damage damage)
 {
   MBWMCompMgrClutterClient * cclient = MB_WM_COMP_MGR_CLUTTER_CLIENT (client);
   MBWindowManager          * wm   = client->wm;
@@ -768,7 +769,7 @@
        * First time we have been called since creation/configure,
        * fetch the whole texture.
        */
-      MBWM_NOTE (DAMAGE, "Full screen repair.");
+      printf ("%s: Full drawable repair\n", __FUNCTION__);
       XDamageSubtract (wm->xdpy, damage, None, None);
       mb_wm_comp_mgr_clutter_fetch_texture (client);
       return;
@@ -785,16 +786,17 @@
 					 &r_count,
 					 &r_bounds);
 
-  if (r_damage)
+  if (r_damage && r_count < 3)
     {
       for (i = 0; i < r_count; ++i)
 	{
-	  MBWM_NOTE (DAMAGE, "Repairing %d,%d;%dx%d",
+                /*
+	  printf ("%s: Repairing %d,%d;%dx%d\n", __FUNCTION__,
 		     r_damage[i].x,
 		     r_damage[i].y,
 		     r_damage[i].width,
 		     r_damage[i].height);
-
+                     */
 	  clutter_x11_texture_pixmap_update_area (
 			CLUTTER_X11_TEXTURE_PIXMAP (cclient->priv->texture),
 			r_damage[i].x,
@@ -805,6 +807,19 @@
 
       XFree (r_damage);
     }
+  else if (r_damage)
+    {
+          /*
+      printf ("%s: r_count %d >= 3, bounding box (%d %d %d %d) repair\n",
+              __FUNCTION__, r_count, r_bounds.x, r_bounds.y,
+              r_bounds.width, r_bounds.height);
+              */
+      clutter_x11_texture_pixmap_update_area (
+			CLUTTER_X11_TEXTURE_PIXMAP (cclient->priv->texture),
+			r_bounds.x, r_bounds.y,
+                        r_bounds.width, r_bounds.height);
+      XFree (r_damage);
+    }
 
   XFixesDestroyRegion (wm->xdpy, parts);
 }


More information about the maemo-commits mailing list