From 674a6c1418167e9aed6f1756c7e08f46b90e850b Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 21 Nov 2013 18:02:36 +0000 Subject: [PATCH 1/4] Update to 1.16.2 --- clutter.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/clutter.spec b/clutter.spec index add7912..9677c60 100644 --- a/clutter.spec +++ b/clutter.spec @@ -5,8 +5,8 @@ %endif Name: clutter -Version: 1.16.0 -Release: 2%{?dist} +Version: 1.16.2 +Release: 1%{?dist} Summary: Open Source software library for creating rich graphical user interfaces Group: Development/Libraries @@ -132,6 +132,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %{_datadir}/gtk-doc/html/cally %changelog +* Thu Nov 21 2013 Richard Hughes - 1.16.2-1 +- Update to 1.16.2 + * Mon Oct 07 2013 Adam Jackson 1.16.0-2 - Fix touchpads to not warp to bizarre places on initial touch. diff --git a/sources b/sources index 5561e7f..45b0186 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -873c97b825c366e13e1f281e8e1f549b clutter-1.16.0.tar.xz +976614a2f7e60af088a0a460fe9d267e clutter-1.16.2.tar.xz From f17f73a21a621c8a58018b766d187865c2836223 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 26 Nov 2013 21:22:09 -0500 Subject: [PATCH 2/4] Avoid excessive redraws --- ...-Don-t-force-redraws-on-source-relay.patch | 83 +++++++++++++++++++ ...aws-when-reallocating-actor-that-hav.patch | 59 +++++++++++++ clutter.spec | 10 ++- 3 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 0001-Bind-constraints-Don-t-force-redraws-on-source-relay.patch create mode 100644 0002-Don-t-queue-redraws-when-reallocating-actor-that-hav.patch 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..7f690dc --- /dev/null +++ b/0001-Bind-constraints-Don-t-force-redraws-on-source-relay.patch @@ -0,0 +1,83 @@ +From fc2a5cfe195fda9d79615fbde140b5ea7dd45b0b Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" +Date: Fri, 22 Nov 2013 10:30:21 -0500 +Subject: [PATCH 1/2] Bind constraints: Don't force redraws on source relayout + +When the source actor potentially changes size, that shouldn't +necessarily result in the target actor being redrawn - it should +be like when a child of a container is reallocated due to changes +in its siblings or parent - it should redraw only to the extent +that it is moved and resized. Privately export an internal function +from clutter-actor.c to allow getting this right. + +https://bugzilla.gnome.org/show_bug.cgi?id=719367 +--- + clutter/clutter-actor-private.h | 1 + + clutter/clutter-actor.c | 4 +--- + clutter/clutter-bind-constraint.c | 2 +- + clutter/clutter-snap-constraint.c | 2 +- + 4 files changed, 4 insertions(+), 5 deletions(-) + +diff --git a/clutter/clutter-actor-private.h b/clutter/clutter-actor-private.h +index 1c6f165..8bcf26c 100644 +--- a/clutter/clutter-actor-private.h ++++ b/clutter/clutter-actor-private.h +@@ -318,6 +318,7 @@ void _clutter_actor_detach_clone + 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 --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c +index 4ceb62c..4504ac6 100644 +--- a/clutter/clutter-actor.c ++++ b/clutter/clutter-actor.c +@@ -1037,8 +1037,6 @@ static void clutter_anchor_coord_set_gravity (AnchorCoord *coord + + 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); +@@ -8862,7 +8860,7 @@ _clutter_actor_queue_redraw_with_clip (ClutterActor *self, + NULL /* effect */); + } + +-static void ++void + _clutter_actor_queue_only_relayout (ClutterActor *self) + { + ClutterActorPrivate *priv = self->priv; +diff --git a/clutter/clutter-bind-constraint.c b/clutter/clutter-bind-constraint.c +index b9e45ab..fa94906 100644 +--- a/clutter/clutter-bind-constraint.c ++++ b/clutter/clutter-bind-constraint.c +@@ -151,7 +151,7 @@ source_queue_relayout (ClutterActor *source, + ClutterBindConstraint *bind) + { + if (bind->actor != NULL) +- clutter_actor_queue_relayout (bind->actor); ++ _clutter_actor_queue_only_relayout (bind->actor); + } + + static void +diff --git a/clutter/clutter-snap-constraint.c b/clutter/clutter-snap-constraint.c +index c8eaea9..b4c558f 100644 +--- a/clutter/clutter-snap-constraint.c ++++ b/clutter/clutter-snap-constraint.c +@@ -94,7 +94,7 @@ source_queue_relayout (ClutterActor *source, + ClutterSnapConstraint *constraint) + { + if (constraint->actor != NULL) +- clutter_actor_queue_relayout (constraint->actor); ++ _clutter_actor_queue_only_relayout (constraint->actor); + } + + static void +-- +1.8.4.2 + 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..f6f12d2 --- /dev/null +++ b/0002-Don-t-queue-redraws-when-reallocating-actor-that-hav.patch @@ -0,0 +1,59 @@ +From 224e0ee7de1fc09adc9eed031f55569d219c567e Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" +Date: Tue, 26 Nov 2013 11:04:27 -0500 +Subject: [PATCH 2/2] Don't queue redraws when reallocating actor that haven't + moved + +When support for implicit animation of actor position was added, +the optimization for not queueing when allocating an actor back +to the same location was lost. This optimization is important +since when we are hierarchically allocating down from the top of +the stage we constantly reallocate the actors at the top of the +hierarchy back to the same place. + +https://bugzilla.gnome.org/show_bug.cgi?id=719368 +--- + clutter/clutter-actor.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c +index 4504ac6..b371183 100644 +--- a/clutter/clutter-actor.c ++++ b/clutter/clutter-actor.c +@@ -9738,7 +9738,9 @@ clutter_actor_allocate_internal (ClutterActor *self, + + 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. ++ */ + } + + /** +@@ -9847,6 +9849,14 @@ clutter_actor_allocate (ClutterActor *self, + 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() +@@ -14718,6 +14728,7 @@ clutter_actor_set_animatable_property (ClutterActor *actor, + clutter_actor_allocate_internal (actor, + g_value_get_boxed (value), + actor->priv->allocation_flags); ++ clutter_actor_queue_redraw (actor); + break; + + case PROP_DEPTH: +-- +1.8.4.2 + diff --git a/clutter.spec b/clutter.spec index 9677c60..f819379 100644 --- a/clutter.spec +++ b/clutter.spec @@ -6,7 +6,7 @@ Name: clutter Version: 1.16.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open Source software library for creating rich graphical user interfaces Group: Development/Libraries @@ -14,6 +14,9 @@ License: LGPLv2+ URL: http://www.clutter-project.org/ Source0: http://download.gnome.org/sources/clutter/1.16/clutter-%{version}.tar.xz Patch0: clutter-1.16.0-fix-evdev-touchpad.patch +# upstream fixes, to avoid excessive redraws +Patch1: 0001-Bind-constraints-Don-t-force-redraws-on-source-relay.patch +Patch2: 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 @@ -81,6 +84,8 @@ This package contains documentation for clutter. %prep %setup -q %patch0 -p1 -b .touch +%patch1 -p1 -b .redraws1 +%patch2 -p1 -b .redraws2 %build (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi; @@ -132,6 +137,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %{_datadir}/gtk-doc/html/cally %changelog +* Tue Nov 26 2013 Matthias Clasen - 1.16.2-2 +- Avoid excessive redraws when windows are moved in gnome-shell + * Thu Nov 21 2013 Richard Hughes - 1.16.2-1 - Update to 1.16.2 From 49f9f8988a09e43f436c82792e325804d134ea28 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 9 Dec 2013 16:48:24 -0500 Subject: [PATCH 3/4] Another fix --- ...-Ignore-a-clip-the-size-of-the-stage.patch | 51 +++++++++++++++++++ clutter.spec | 5 ++ 2 files changed, 56 insertions(+) create mode 100644 0001-ClutterStageCogl-Ignore-a-clip-the-size-of-the-stage.patch diff --git a/0001-ClutterStageCogl-Ignore-a-clip-the-size-of-the-stage.patch b/0001-ClutterStageCogl-Ignore-a-clip-the-size-of-the-stage.patch new file mode 100644 index 0000000..e915ad1 --- /dev/null +++ b/0001-ClutterStageCogl-Ignore-a-clip-the-size-of-the-stage.patch @@ -0,0 +1,51 @@ +From a2dfe2562fa9a455518d4c10c334f9ed7d92f96b Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" +Date: Wed, 4 Dec 2013 23:54:27 -0500 +Subject: [PATCH] ClutterStageCogl: Ignore a clip the size of the stage + +If the clip region includes the entire stage, ignore it - we aren't +actually clipped. + +https://bugzilla.gnome.org/show_bug.cgi?id=719901 +--- + clutter/cogl/clutter-stage-cogl.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/clutter/cogl/clutter-stage-cogl.c b/clutter/cogl/clutter-stage-cogl.c +index 3aa02bd..86546b1 100644 +--- a/clutter/cogl/clutter-stage-cogl.c ++++ b/clutter/cogl/clutter-stage-cogl.c +@@ -398,6 +398,8 @@ static void + clutter_stage_cogl_redraw (ClutterStageWindow *stage_window) + { + ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window); ++ cairo_rectangle_int_t geom; ++ gboolean have_clip; + gboolean may_use_clipped_redraw; + gboolean use_clipped_redraw; + gboolean can_blit_sub_buffer; +@@ -435,11 +437,19 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window) + + has_buffer_age = cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE); + ++ _clutter_stage_window_get_geometry (stage_window, &geom); ++ ++ /* NB: a zero width redraw clip == full stage redraw */ ++ have_clip = (stage_cogl->bounding_redraw_clip.width != 0 && ++ !(stage_cogl->bounding_redraw_clip.x == 0 && ++ stage_cogl->bounding_redraw_clip.y == 0 && ++ stage_cogl->bounding_redraw_clip.width == geom.width && ++ stage_cogl->bounding_redraw_clip.height == geom.height)); ++ + may_use_clipped_redraw = FALSE; + if (_clutter_stage_window_can_clip_redraws (stage_window) && + can_blit_sub_buffer && +- /* NB: a zero width redraw clip == full stage redraw */ +- stage_cogl->bounding_redraw_clip.width != 0 && ++ have_clip && + /* some drivers struggle to get going and produce some junk + * frames when starting up... */ + stage_cogl->frame_count > 3) +-- +1.8.4.2 + diff --git a/clutter.spec b/clutter.spec index f819379..18755b3 100644 --- a/clutter.spec +++ b/clutter.spec @@ -17,6 +17,7 @@ Patch0: clutter-1.16.0-fix-evdev-touchpad.patch # upstream fixes, to avoid excessive redraws Patch1: 0001-Bind-constraints-Don-t-force-redraws-on-source-relay.patch Patch2: 0002-Don-t-queue-redraws-when-reallocating-actor-that-hav.patch +Patch3: 0001-ClutterStageCogl-Ignore-a-clip-the-size-of-the-stage.patch BuildRequires: glib2-devel mesa-libGL-devel pkgconfig pango-devel BuildRequires: cairo-gobject-devel gdk-pixbuf2-devel atk-devel @@ -86,6 +87,7 @@ This package contains documentation for clutter. %patch0 -p1 -b .touch %patch1 -p1 -b .redraws1 %patch2 -p1 -b .redraws2 +%patch3 -p1 -b .redraws3 %build (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi; @@ -137,6 +139,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %{_datadir}/gtk-doc/html/cally %changelog +* Mon Dec 9 2013 Matthias Clasen - 1.16.2-3 +- A followup fix to the previous changes + * Tue Nov 26 2013 Matthias Clasen - 1.16.2-2 - Avoid excessive redraws when windows are moved in gnome-shell From b67c36d9795c23c41beae89223ce429213319c6d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 9 Dec 2013 16:50:35 -0500 Subject: [PATCH 4/4] bump rev --- clutter.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter.spec b/clutter.spec index 18755b3..cba2ce3 100644 --- a/clutter.spec +++ b/clutter.spec @@ -6,7 +6,7 @@ Name: clutter Version: 1.16.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Open Source software library for creating rich graphical user interfaces Group: Development/Libraries