2008-02-04 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-actor.c:
	* clutter/clutter-shader.c: Small documentation and style fixes

	* tests/test-scale.c: Constify the gravities array.
This commit is contained in:
Emmanuele Bassi 2008-02-04 22:35:38 +00:00
parent 209793c7a3
commit 2764fa2f87
4 changed files with 23 additions and 22 deletions

View File

@ -1,3 +1,10 @@
2008-02-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
* clutter/clutter-shader.c: Small documentation and style fixes
* tests/test-scale.c: Constify the gravities array.
2008-02-04 Chris Lord <chris@openedhand.com>
* clutter/clutter-actor.c: (clutter_actor_transform_stage_point):

View File

@ -5033,11 +5033,11 @@ destroy_shader_data (ClutterActor *self)
/**
* clutter_actor_get_shader:
* @self: a #ClutterActor
* @shader: a #ClutterShader or %NULL
*
* Queries the currently set #ClutterShader on @self.
*
* Return value: The currently set #ClutterShader or NULL if no shader is set.
* Return value: The currently set #ClutterShader or %NULL if no
* shader is set.
*
* Since: 0.6
*/
@ -5053,9 +5053,8 @@ clutter_actor_get_shader (ClutterActor *self)
shader_data = actor_priv->shader_data;
if (!shader_data)
{
return NULL;
}
return shader_data->shader;
}
@ -5109,7 +5108,6 @@ clutter_actor_set_shader (ClutterActor *self,
shader_data->shader = g_object_ref (shader);
}
clutter_actor_queue_redraw (self);
return TRUE;

View File

@ -340,10 +340,7 @@ clutter_shader_set_fragment_source (ClutterShader *shader,
is_glsl = !g_str_has_prefix (data, "!!ARBfp");
if (priv->fragment_source)
{
g_free (priv->fragment_source);
}
CLUTTER_NOTE (SHADER, "setting fragment shader (GLSL:%s, len:%"
G_GSSIZE_FORMAT ")",
@ -387,13 +384,9 @@ clutter_shader_set_vertex_source (ClutterShader *shader,
if (clutter_shader_is_bound (shader))
clutter_shader_release (shader);
is_glsl = !g_str_has_prefix (data, "!!ARBvp");
if (priv->vertex_source)
{
g_free (priv->vertex_source);
}
CLUTTER_NOTE (SHADER, "setting vertex shader (GLSL:%s, len:%"
G_GSSIZE_FORMAT ")",

View File

@ -1,7 +1,7 @@
#include <stdlib.h>
#include <clutter/clutter.h>
ClutterGravity gravities[] = {
static const ClutterGravity gravities[] = {
CLUTTER_GRAVITY_NORTH_EAST,
CLUTTER_GRAVITY_NORTH,
CLUTTER_GRAVITY_NORTH_WEST,
@ -14,9 +14,9 @@ ClutterGravity gravities[] = {
CLUTTER_GRAVITY_NONE
};
gint gindex = 0;
static gint gindex = 0;
void
static void
on_timeline_completed (ClutterTimeline *cluttertimeline,
gpointer data)
{
@ -59,7 +59,7 @@ main (int argc, char *argv[])
clutter_group_add (CLUTTER_GROUP (stage), rect);
timeline = clutter_timeline_new (20, 30);
timeline = clutter_timeline_new_for_duration (750);
alpha = clutter_alpha_new_full (timeline,
CLUTTER_ALPHA_RAMP,
NULL, NULL);
@ -79,5 +79,8 @@ main (int argc, char *argv[])
clutter_main();
g_object_unref (timeline);
g_object_unref (behave);
return EXIT_SUCCESS;
}