[clutter/f19] Another upstream redraw fix

Matthias Clasen mclasen at fedoraproject.org
Mon Dec 9 20:14:29 UTC 2013


commit b2e471eef40a50c44aad1e7a4cfb90d44698889a
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Mon Dec 9 15:14:20 2013 -0500

    Another upstream redraw fix

 ...eCogl-Ignore-a-clip-the-size-of-the-stage.patch |   51 ++++++++++++++++++++
 clutter.spec                                       |    5 ++
 2 files changed, 56 insertions(+), 0 deletions(-)
---
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" <otaylor at 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
+
diff --git a/clutter.spec b/clutter.spec
index 2a3dc3c..735e4a3 100644
--- a/clutter.spec
+++ b/clutter.spec
@@ -17,6 +17,7 @@ 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
+Patch5:		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
@@ -79,6 +80,7 @@ This package contains documentation for clutter.
 %patch2 -p1 -b .cogl-crash
 %patch3 -p1 -b .redraw1
 %patch4 -p1 -b .redraw2
+%patch5 -p1 -b .redraw3
 
 %build
 (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
@@ -123,6 +125,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
 %{_datadir}/gtk-doc/html/cally
 
 %changelog
+* Mon Dec  9 2013 Matthias Clasen <mclasen at redhat.com> - 1.14.4-6
+- A follow-up fix to the previous changes
+
 * Tue Nov 26 2013 Matthias Clasen <mclasen at redhat.com> - 1.14.4-5
 - Avoid excessive redraws when moving windows in gnome-shell
 


More information about the scm-commits mailing list