Merge commit 'b67c36d9795c23c41beae89223ce429213319c6d'
Conflicts: clutter.spec
This commit is contained in:
commit
8c264d8284
@ -0,0 +1,83 @@
|
||||
From fc2a5cfe195fda9d79615fbde140b5ea7dd45b0b Mon Sep 17 00:00:00 2001
|
||||
From: "Owen W. Taylor" <otaylor@fishsoup.net>
|
||||
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
|
||||
|
@ -0,0 +1,51 @@
|
||||
From a2dfe2562fa9a455518d4c10c334f9ed7d92f96b Mon Sep 17 00:00:00 2001
|
||||
From: "Owen W. Taylor" <otaylor@fishsoup.net>
|
||||
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
|
||||
|
@ -0,0 +1,59 @@
|
||||
From 224e0ee7de1fc09adc9eed031f55569d219c567e Mon Sep 17 00:00:00 2001
|
||||
From: "Owen W. Taylor" <otaylor@fishsoup.net>
|
||||
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
|
||||
|
17
clutter.spec
17
clutter.spec
@ -6,7 +6,7 @@
|
||||
|
||||
Name: clutter
|
||||
Version: 1.16.2
|
||||
Release: 1%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Open Source software library for creating rich graphical user interfaces
|
||||
|
||||
Group: Development/Libraries
|
||||
@ -14,6 +14,10 @@ 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
|
||||
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
|
||||
@ -81,6 +85,9 @@ This package contains documentation for clutter.
|
||||
%prep
|
||||
%setup -q
|
||||
%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;
|
||||
@ -132,7 +139,13 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
||||
%{_datadir}/gtk-doc/html/cally
|
||||
|
||||
%changelog
|
||||
* Tue Nov 19 2013 Richard Hughes <rhughes@redhat.com> - 1.16.2-1
|
||||
* Mon Dec 9 2013 Matthias Clasen <mclasen@redhat.com> - 1.16.2-3
|
||||
- A followup fix to the previous changes
|
||||
|
||||
* Tue Nov 26 2013 Matthias Clasen <mclasen@redhat.com> - 1.16.2-2
|
||||
- Avoid excessive redraws when windows are moved in gnome-shell
|
||||
|
||||
* Thu Nov 21 2013 Richard Hughes <rhughes@redhat.com> - 1.16.2-1
|
||||
- Update to 1.16.2
|
||||
|
||||
* Mon Oct 07 2013 Adam Jackson <ajax@redhat.com> 1.16.0-2
|
||||
|
Loading…
Reference in New Issue
Block a user