[gnome-shell] Support and require Clutter 1.2



commit 58bb0044b244f16450feef26cb0c8efb62b4bc46
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Thu Feb 11 15:24:13 2010 -0500

    Support and require Clutter 1.2
    
    - Specify a minimum version of clutter-1.2.0
     - Switch clutter branch in the moduleset to master
     - Replace deprecated cogl_texture/material_unref() with
       cogl_handle_unref()
     - Use cogl_clip_push_rectangle() rather than cogl_clip_push()
     - Replace cogl_check_extension() with strstr - should be
       accurate enough.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=610679

 configure.ac                    |    6 +++++-
 src/big/rectangle.c             |    8 ++++----
 src/shell-drawing.c             |    2 +-
 src/shell-recorder.c            |    4 ++--
 src/shell-slicer.c              |    2 +-
 src/st/st-box-layout.c          |   16 ++++++++--------
 src/st/st-shadow-texture.c      |    4 ++--
 src/st/st-subtexture.c          |    4 ++--
 src/st/st-texture-cache.c       |    2 +-
 tools/build/gnome-shell.modules |    2 +-
 10 files changed, 27 insertions(+), 23 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 315bdfd..dc917af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,10 +55,14 @@ fi
 
 AM_CONDITIONAL(BUILD_RECORDER, $build_recorder)
 
+CLUTTER_MIN_VERSION=1.2.0
+
 # Collect more than 20 libraries for a prize!
 PKG_CHECK_MODULES(MUTTER_PLUGIN, gio-unix-2.0 gtk+-2.0 dbus-glib-1 mutter-plugins >= 2.29.0
                                  gjs-gi-1.0 libgnome-menu $recorder_modules gconf-2.0
-                                 gdk-x11-2.0 clutter-x11-1.0 clutter-glx-1.0
+                                 gdk-x11-2.0
+				 clutter-x11-1.0 >= $CLUTTER_MIN_VERSION
+				 clutter-glx-1.0 >= $CLUTTER_MIN_VERSION
                                  libstartup-notification-1.0
                                  gobject-introspection-1.0 >= 0.6.5)
 PKG_CHECK_MODULES(TIDY, clutter-1.0)
diff --git a/src/big/rectangle.c b/src/big/rectangle.c
index fa594e6..fc960b3 100644
--- a/src/big/rectangle.c
+++ b/src/big/rectangle.c
@@ -233,7 +233,7 @@ corner_unref(Corner *corner)
     if (corner->ref_count == 0) {
         g_hash_table_remove(all_corners, corner);
 
-        cogl_texture_unref(corner->texture);
+        cogl_handle_unref(corner->texture);
         g_free(corner->data);
         g_free(corner);
     }
@@ -608,17 +608,17 @@ big_rectangle_dispose(GObject *object)
     }
 
     if (rectangle->corner_material) {
-        cogl_material_unref (rectangle->corner_material);
+        cogl_handle_unref (rectangle->corner_material);
         rectangle->corner_material = NULL;
     }
 
     if (rectangle->background_material) {
-        cogl_material_unref (rectangle->background_material);
+        cogl_handle_unref (rectangle->background_material);
         rectangle->background_material = NULL;
     }
 
     if (rectangle->border_material) {
-        cogl_material_unref (rectangle->border_material);
+        cogl_handle_unref (rectangle->border_material);
         rectangle->border_material = NULL;
     }
 
diff --git a/src/shell-drawing.c b/src/shell-drawing.c
index c62713f..c0e7632 100644
--- a/src/shell-drawing.c
+++ b/src/shell-drawing.c
@@ -111,7 +111,7 @@ shell_fade_app_icon (ClutterTexture *source)
     
   result = (ClutterTexture*)clutter_texture_new ();
   clutter_texture_set_cogl_texture (result, texture);
-  cogl_texture_unref (texture);
+  cogl_handle_unref (texture);
   
   return result;
 }
diff --git a/src/shell-recorder.c b/src/shell-recorder.c
index 5bfcdae..8c1fb3f 100644
--- a/src/shell-recorder.c
+++ b/src/shell-recorder.c
@@ -280,7 +280,7 @@ shell_recorder_finalize (GObject  *object)
   recorder_set_pipeline (recorder, NULL);
   recorder_set_filename (recorder, NULL);
 
-  cogl_texture_unref (recorder->recording_icon);
+  cogl_handle_unref (recorder->recording_icon);
 
   G_OBJECT_CLASS (shell_recorder_parent_class)->finalize (object);
 }
@@ -872,7 +872,7 @@ recorder_set_stage (ShellRecorder *recorder,
 
       clutter_stage_ensure_current (stage);
       gl_extensions = (const char *)glGetString (GL_EXTENSIONS);
-      recorder->have_pack_invert = cogl_check_extension ("GL_MESA_pack_invert", gl_extensions);
+      recorder->have_pack_invert = strstr (gl_extensions, "GL_MESA_pack_invert") != NULL;
 
       recorder_get_initial_cursor_position (recorder);
     }
diff --git a/src/shell-slicer.c b/src/shell-slicer.c
index bcc27de..c6a9915 100644
--- a/src/shell-slicer.c
+++ b/src/shell-slicer.c
@@ -119,7 +119,7 @@ shell_slicer_paint_child (ShellSlicer *self)
 
   cogl_push_matrix ();
 
-  cogl_clip_push (0, 0, width, height);
+  cogl_clip_push_rectangle (0, 0, width, height);
   cogl_translate ((int)(0.5 + x_align_factor * (width - child_width)),
                   (int)(0.5 + y_align_factor * (height - child_height)),
                   0);
diff --git a/src/st/st-box-layout.c b/src/st/st-box-layout.c
index eede854..08f3042 100644
--- a/src/st/st-box-layout.c
+++ b/src/st/st-box-layout.c
@@ -1024,10 +1024,10 @@ st_box_layout_paint (ClutterActor *actor)
    * the borders and background stay in place; after drawing the borders and
    * background, we clip to the content area */
   if (priv->hadjustment || priv->vadjustment)
-    cogl_clip_push ((int)content_box.x1,
-                    (int)content_box.y1,
-                    (int)content_box.x2 - (int)content_box.x1,
-                    (int)content_box.y2 - (int)content_box.y1);
+    cogl_clip_push_rectangle ((int)content_box.x1,
+                              (int)content_box.y1,
+                              (int)content_box.x2,
+                              (int)content_box.y2);
 
   for (l = priv->children; l; l = g_list_next (l))
     {
@@ -1098,10 +1098,10 @@ st_box_layout_pick (ClutterActor       *actor,
   content_box.y2 += y;
 
   if (priv->hadjustment || priv->vadjustment)
-    cogl_clip_push ((int)content_box.x1,
-                    (int)content_box.y1,
-                    (int)content_box.x2 - (int)content_box.x1,
-                    (int)content_box.y2 - (int)content_box.y1);
+    cogl_clip_push_rectangle ((int)content_box.x1,
+                              (int)content_box.y1,
+                              (int)content_box.x2,
+                              (int)content_box.y2);
 
   for (l = priv->children; l; l = g_list_next (l))
     {
diff --git a/src/st/st-shadow-texture.c b/src/st/st-shadow-texture.c
index 74ca923..04b6b90 100644
--- a/src/st/st-shadow-texture.c
+++ b/src/st/st-shadow-texture.c
@@ -191,8 +191,8 @@ st_shadow_texture_create_shadow (StShadowTexture *st,
 
   clutter_texture_set_cogl_material (CLUTTER_TEXTURE (st), material);
 
-  cogl_texture_unref  (texture);
-  cogl_material_unref (material);
+  cogl_handle_unref  (texture);
+  cogl_handle_unref (material);
 
   g_free (pixels_in);
   g_free (pixels_out);
diff --git a/src/st/st-subtexture.c b/src/st/st-subtexture.c
index 0f34814..c51fc50 100644
--- a/src/st/st-subtexture.c
+++ b/src/st/st-subtexture.c
@@ -131,7 +131,7 @@ st_subtexture_unrealize (ClutterActor *self)
   if (priv->material == COGL_INVALID_HANDLE)
     return;
 
-  cogl_material_unref (priv->material);
+  cogl_handle_unref (priv->material);
   priv->material = COGL_INVALID_HANDLE;
 
   CLUTTER_ACTOR_UNSET_FLAGS (self, CLUTTER_ACTOR_REALIZED);
@@ -338,7 +338,7 @@ st_subtexture_dispose (GObject *gobject)
 
   if (priv->material)
     {
-      cogl_material_unref (priv->material);
+      cogl_handle_unref (priv->material);
       priv->material = COGL_INVALID_HANDLE;
     }
 
diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
index 5731ef9..b1e3723 100644
--- a/src/st/st-texture-cache.c
+++ b/src/st/st-texture-cache.c
@@ -865,7 +865,7 @@ st_texture_cache_load (StTextureCache       *cache,
       else
         return COGL_INVALID_HANDLE;
     }
-  cogl_texture_ref (texture);
+  cogl_handle_unref (texture);
   return texture;
 }
 
diff --git a/tools/build/gnome-shell.modules b/tools/build/gnome-shell.modules
index 7fdd2b5..e0e048b 100644
--- a/tools/build/gnome-shell.modules
+++ b/tools/build/gnome-shell.modules
@@ -61,7 +61,7 @@
   </autotools>
 
   <autotools id="clutter">
-    <branch repo="git.clutter-project.org" module="clutter" revision="clutter-1.0"/>
+    <branch repo="git.clutter-project.org" module="clutter" revision="master"/>
     <dependencies>
         <dep package="gobject-introspection"/>
     </dependencies>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]