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
This commit is contained in:
Owen W. Taylor 2010-02-11 15:24:13 -05:00
parent 79865172d3
commit 58bb0044b2
10 changed files with 27 additions and 23 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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))
{

View File

@ -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);

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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>