[clutter/f19] Avoid excessive redraws

Matthias Clasen mclasen at fedoraproject.org
Wed Nov 27 02:51:02 UTC 2013


commit 482a85dd34aec1e4181e284e090ec1d476384971
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Tue Nov 26 21:50:43 2013 -0500

    Avoid excessive redraws

 ...aints-Don-t-force-redraws-on-source-relay.patch |   56 ++++++++++++++++++++
 ...-redraws-when-reallocating-actor-that-hav.patch |   37 +++++++++++++
 clutter.spec                                       |   10 +++-
 3 files changed, 102 insertions(+), 1 deletions(-)
---
diff --git a/0001-Bind-constraints-Don-t-force-redraws-on-source-relay.patch b/0001-Bind-constraints-Don-t-force-redraws-on-source-relay.patch
new file mode 100644
index 0000000..b57da8a
--- /dev/null
+++ b/0001-Bind-constraints-Don-t-force-redraws-on-source-relay.patch
@@ -0,0 +1,56 @@
+diff -up clutter-1.14.4/clutter/clutter-actor-private.h.redraw1 clutter-1.14.4/clutter/clutter-actor-private.h
+--- clutter-1.14.4/clutter/clutter-actor-private.h.redraw1	2013-05-13 06:54:35.000000000 -0400
++++ clutter-1.14.4/clutter/clutter-actor-private.h	2013-11-26 21:48:20.204286153 -0500
+@@ -318,6 +318,7 @@ void                            _clutter
+                                                                                          ClutterActor *clone);
+ void                            _clutter_actor_queue_redraw_on_clones                   (ClutterActor *actor);
+ void                            _clutter_actor_queue_relayout_on_clones                 (ClutterActor *actor);
++void                            _clutter_actor_queue_only_relayout                      (ClutterActor *actor);
+ 
+ G_END_DECLS
+ 
+diff -up clutter-1.14.4/clutter/clutter-actor.c.redraw1 clutter-1.14.4/clutter/clutter-actor.c
+--- clutter-1.14.4/clutter/clutter-actor.c.redraw1	2013-05-14 15:23:21.000000000 -0400
++++ clutter-1.14.4/clutter/clutter-actor.c	2013-11-26 21:48:20.206286151 -0500
+@@ -1040,8 +1040,6 @@ static void           clutter_anchor_coo
+ 
+ static gboolean clutter_anchor_coord_is_zero (const AnchorCoord *coord);
+ 
+-static void _clutter_actor_queue_only_relayout (ClutterActor *self);
+-
+ static void _clutter_actor_get_relative_transformation_matrix (ClutterActor *self,
+                                                                ClutterActor *ancestor,
+                                                                CoglMatrix *matrix);
+@@ -8800,7 +8798,7 @@ _clutter_actor_queue_redraw_with_clip (C
+                                     NULL /* effect */);
+ }
+ 
+-static void
++void
+ _clutter_actor_queue_only_relayout (ClutterActor *self)
+ {
+   ClutterActorPrivate *priv = self->priv;
+diff -up clutter-1.14.4/clutter/clutter-bind-constraint.c.redraw1 clutter-1.14.4/clutter/clutter-bind-constraint.c
+--- clutter-1.14.4/clutter/clutter-bind-constraint.c.redraw1	2013-05-13 06:54:35.000000000 -0400
++++ clutter-1.14.4/clutter/clutter-bind-constraint.c	2013-11-26 21:48:20.207286151 -0500
+@@ -151,7 +151,7 @@ source_queue_relayout (ClutterActor
+                        ClutterBindConstraint *bind)
+ {
+   if (bind->actor != NULL)
+-    clutter_actor_queue_relayout (bind->actor);
++    _clutter_actor_queue_only_relayout (bind->actor);
+ }
+ 
+ static void
+diff -up clutter-1.14.4/clutter/clutter-snap-constraint.c.redraw1 clutter-1.14.4/clutter/clutter-snap-constraint.c
+--- clutter-1.14.4/clutter/clutter-snap-constraint.c.redraw1	2013-05-13 06:54:35.000000000 -0400
++++ clutter-1.14.4/clutter/clutter-snap-constraint.c	2013-11-26 21:48:20.207286151 -0500
+@@ -94,7 +94,7 @@ source_queue_relayout (ClutterActor
+                        ClutterSnapConstraint *constraint)
+ {
+   if (constraint->actor != NULL)
+-    clutter_actor_queue_relayout (constraint->actor);
++    _clutter_actor_queue_only_relayout (constraint->actor);
+ }
+ 
+ static void
diff --git a/0002-Don-t-queue-redraws-when-reallocating-actor-that-hav.patch b/0002-Don-t-queue-redraws-when-reallocating-actor-that-hav.patch
new file mode 100644
index 0000000..4e3f278
--- /dev/null
+++ b/0002-Don-t-queue-redraws-when-reallocating-actor-that-hav.patch
@@ -0,0 +1,37 @@
+diff -up clutter-1.14.4/clutter/clutter-actor.c.redraw2 clutter-1.14.4/clutter/clutter-actor.c
+--- clutter-1.14.4/clutter/clutter-actor.c.redraw2	2013-11-26 21:48:53.656256967 -0500
++++ clutter-1.14.4/clutter/clutter-actor.c	2013-11-26 21:48:53.662256962 -0500
+@@ -9676,7 +9676,9 @@ clutter_actor_allocate_internal (Clutter
+ 
+   CLUTTER_UNSET_PRIVATE_FLAGS (self, CLUTTER_IN_RELAYOUT);
+ 
+-  clutter_actor_queue_redraw (self);
++  /* Caller should call clutter_actor_queue_redraw() if needed
++   * for that particular case.
++   */
+ }
+ 
+ /**
+@@ -9785,6 +9787,14 @@ clutter_actor_allocate (ClutterActor
+       return;
+     }
+ 
++  if (!stage_allocation_changed)
++    {
++      /* If the actor didn't move but needs_allocation is set, we just
++       * need to allocate the children */
++      clutter_actor_allocate_internal (self, &real_allocation, flags);
++      return;
++    }
++
+   /* When ABSOLUTE_ORIGIN_CHANGED is passed in to
+    * clutter_actor_allocate(), it indicates whether the parent has its
+    * absolute origin moved; when passed in to ClutterActor::allocate()
+@@ -14653,6 +14663,7 @@ clutter_actor_set_animatable_property (C
+       clutter_actor_allocate_internal (actor,
+                                        g_value_get_boxed (value),
+                                        actor->priv->allocation_flags);
++      clutter_actor_queue_redraw (actor);
+       break;
+ 
+     case PROP_DEPTH:
diff --git a/clutter.spec b/clutter.spec
index 2014478..2a3dc3c 100644
--- a/clutter.spec
+++ b/clutter.spec
@@ -2,7 +2,7 @@
 
 Name:          clutter
 Version:       1.14.4
-Release:       4%{?dist}
+Release:       5%{?dist}
 Summary:       Open Source software library for creating rich graphical user interfaces
 
 Group:         Development/Libraries
@@ -14,6 +14,9 @@ Patch0:        0001-cally-Use-a-weak-pointer-to-hold-the-key-focus-in-Ca.patch
 # https://bugzilla.gnome.org/show_bug.cgi?id=701974
 Patch1:        0001-x11-trap-errors-when-calling-XIQueryDevice.patch
 Patch2:        0001-clutter-offscreen-effect-Allocate-the-cogl-texture-d.patch
+# upstream fixes for excessive redraws
+Patch3: 	0001-Bind-constraints-Don-t-force-redraws-on-source-relay.patch
+Patch4:		0002-Don-t-queue-redraws-when-reallocating-actor-that-hav.patch
 
 BuildRequires: glib2-devel mesa-libGL-devel pkgconfig pango-devel
 BuildRequires: cairo-gobject-devel gdk-pixbuf2-devel atk-devel
@@ -74,6 +77,8 @@ This package contains documentation for clutter.
 %patch0 -p1 -b .cally_crash
 %patch1 -p1 -b .xi2-crash
 %patch2 -p1 -b .cogl-crash
+%patch3 -p1 -b .redraw1
+%patch4 -p1 -b .redraw2
 
 %build
 (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
@@ -118,6 +123,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
 %{_datadir}/gtk-doc/html/cally
 
 %changelog
+* Tue Nov 26 2013 Matthias Clasen <mclasen at redhat.com> - 1.14.4-5
+- Avoid excessive redraws when moving windows in gnome-shell
+
 * Wed Jun 26 2013 Adel Gadllah <adel.gadllah at gmail.com> - 1.14.4-4
 - Fix texture allocation crash - #975171
 


More information about the scm-commits mailing list