Commit 4589d124 authored by Thomas Wood's avatar Thomas Wood

Update to Clutter 0.9

Fixes various API breakage due to switching to Clutter 0.9.
parent 66a5edd3
......@@ -302,7 +302,7 @@ if test x$have_xrender = xyes; then
AC_DEFINE(HAVE_RENDER, , [Building with Render extension support])
fi
CLUTTER_PACKAGE=clutter-0.8
CLUTTER_PACKAGE=clutter-0.9
AC_SUBST(CLUTTER_PACKAGE)
if test x$have_clutter = xyes; then
METACITY_PC_MODULES="$METACITY_PC_MODULES $CLUTTER_PACKAGE "
......
......@@ -34,11 +34,7 @@
#include <X11/extensions/Xrender.h>
#include <clutter/clutter.h>
#include <clutter/clutter-group.h>
#include <clutter/x11/clutter-x11.h>
#ifdef HAVE_GLX_TEXTURE_PIXMAP
#include <clutter/glx/clutter-glx.h>
#endif /* HAVE_GLX_TEXTURE_PIXMAP */
#include <cogl/cogl.h>
#define SHADOW_RADIUS 8
......
......@@ -25,15 +25,12 @@
#include <config.h>
#include <clutter/clutter-texture.h>
#include <clutter/x11/clutter-x11.h>
#ifdef HAVE_GLX_TEXTURE_PIXMAP
#include <clutter/glx/clutter-glx.h>
#endif /* HAVE_GLX_TEXTURE_PIXMAP */
#include "mutter-shaped-texture.h"
#include <clutter/clutter.h>
#include <cogl/cogl.h>
#include <string.h>
#include "mutter-shaped-texture.h"
static void mutter_shaped_texture_dispose (GObject *object);
static void mutter_shaped_texture_finalize (GObject *object);
......@@ -364,7 +361,6 @@ mutter_shaped_texture_paint (ClutterActor *actor)
guint paint_gl_width, paint_gl_height;
GLfloat vertex_coords[8], paint_tex_coords[8];
ClutterActorBox alloc;
static const ClutterColor white = { 0xff, 0xff, 0xff, 0xff };
#if 1 /* please see comment below about workaround */
guint depth;
GLint orig_gl_tex_env_mode;
......@@ -427,7 +423,7 @@ mutter_shaped_texture_paint (ClutterActor *actor)
glDisableClientState (GL_COLOR_ARRAY);
glVertexPointer (2, GL_FLOAT, 0, vertex_coords);
glTexCoordPointer (2, GL_FLOAT, 0, paint_tex_coords);
cogl_color (&white);
cogl_set_source_color4ub (0xff, 0xff, 0xff, 0xff);
/* Put the main painting texture in the first texture unit */
glBindTexture (paint_target, paint_gl_tex);
......@@ -600,16 +596,17 @@ mutter_shaped_texture_pick (ClutterActor *actor,
mutter_shaped_texture_ensure_mask (stex);
cogl_color (color);
cogl_set_source_color4ub (color->red, color->green, color->blue,
color->alpha);
clutter_actor_get_allocation_box (actor, &alloc);
/* Paint the mask rectangle in the given color */
cogl_texture_rectangle (priv->mask_texture,
0, 0,
CLUTTER_UNITS_TO_FIXED (alloc.x2 - alloc.x1),
CLUTTER_UNITS_TO_FIXED (alloc.y2 - alloc.y1),
0, 0, CFX_ONE, CFX_ONE);
cogl_set_source_texture (priv->mask_texture);
cogl_rectangle_with_texture_coords (0, 0,
CLUTTER_UNITS_TO_FIXED (alloc.x2 - alloc.x1),
CLUTTER_UNITS_TO_FIXED (alloc.y2 - alloc.y1),
0, 0, CFX_ONE, CFX_ONE);
}
}
......
......@@ -26,8 +26,7 @@
#ifndef __MUTTER_SHAPED_TEXTURE_H__
#define __MUTTER_SHAPED_TEXTURE_H__
#include <clutter/clutter-texture.h>
#include <clutter/x11/clutter-x11.h>
#include <clutter/clutter.h>
#ifdef HAVE_GLX_TEXTURE_PIXMAP
#include <clutter/glx/clutter-glx.h>
#endif /* HAVE_GLX_TEXTURE_PIXMAP */
......
......@@ -96,12 +96,6 @@ MUTTER_PLUGIN_DECLARE(MutterDefaultPlugin, mutter_default_plugin);
*/
struct _MutterDefaultPluginPrivate
{
ClutterEffectTemplate *destroy_effect;
ClutterEffectTemplate *minimize_effect;
ClutterEffectTemplate *maximize_effect;
ClutterEffectTemplate *map_effect;
ClutterEffectTemplate *switch_workspace_effect;
/* Valid only when switch_workspace effect is in progress */
ClutterTimeline *tml_switch_workspace1;
ClutterTimeline *tml_switch_workspace2;
......@@ -114,16 +108,35 @@ struct _MutterDefaultPluginPrivate
gboolean debug_mode : 1;
};
static void
mutter_default_plugin_dispose (GObject *object)
/*
* Per actor private data we attach to each actor.
*/
typedef struct _ActorPrivate
{
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (object)->priv;
ClutterActor *orig_parent;
g_object_unref (priv->destroy_effect);
g_object_unref (priv->minimize_effect);
g_object_unref (priv->maximize_effect);
g_object_unref (priv->switch_workspace_effect);
ClutterTimeline *tml_minimize;
ClutterTimeline *tml_maximize;
ClutterTimeline *tml_destroy;
ClutterTimeline *tml_map;
gboolean is_minimized : 1;
gboolean is_maximized : 1;
} ActorPrivate;
/* callback data for when animations complete */
typedef struct
{
ClutterActor *actor;
MutterPlugin *plugin;
} EffectCompleteData;
static void
mutter_default_plugin_dispose (GObject *object)
{
/* MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (object)->priv;
*/
G_OBJECT_CLASS (mutter_default_plugin_parent_class)->dispose (object);
}
......@@ -189,31 +202,6 @@ mutter_default_plugin_constructed (GObject *object)
switch_timeout *= 2;
}
priv->destroy_effect
= clutter_effect_template_new (clutter_timeline_new_for_duration (
destroy_timeout),
CLUTTER_ALPHA_SINE_INC);
priv->minimize_effect
= clutter_effect_template_new (clutter_timeline_new_for_duration (
minimize_timeout),
CLUTTER_ALPHA_SINE_INC);
priv->maximize_effect
= clutter_effect_template_new (clutter_timeline_new_for_duration (
maximize_timeout),
CLUTTER_ALPHA_SINE_INC);
priv->map_effect
= clutter_effect_template_new (clutter_timeline_new_for_duration (
map_timeout),
CLUTTER_ALPHA_SINE_INC);
priv->switch_workspace_effect
= clutter_effect_template_new (clutter_timeline_new_for_duration (
switch_timeout),
CLUTTER_ALPHA_SINE_INC);
}
static void
......@@ -254,23 +242,6 @@ mutter_default_plugin_init (MutterDefaultPlugin *self)
priv->info.description = "This is an example of a plugin implementation.";
}
/*
* Per actor private data we attach to each actor.
*/
typedef struct _ActorPrivate
{
ClutterActor *orig_parent;
ClutterTimeline *tml_minimize;
ClutterTimeline *tml_maximize;
ClutterTimeline *tml_destroy;
ClutterTimeline *tml_map;
gboolean is_minimized : 1;
gboolean is_maximized : 1;
} ActorPrivate;
/*
* Actor private data accessor
*/
......@@ -308,7 +279,7 @@ typedef struct SwitchWorkspaceData
} SwitchWorkspaceData;
static void
on_switch_workspace_effect_complete (ClutterActor *group, gpointer data)
on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
{
SwitchWorkspaceData *sw_data = data;
MutterPlugin *plugin = sw_data->plugin;
......@@ -360,6 +331,7 @@ switch_workspace (MutterPlugin *plugin,
int screen_width, screen_height;
MetaScreen *screen = mutter_plugin_get_screen (plugin);
SwitchWorkspaceData *sw_data = g_new (SwitchWorkspaceData, 1);
ClutterAnimation *animation;
sw_data->plugin = plugin;
sw_data->actors = actors;
......@@ -435,16 +407,23 @@ switch_workspace (MutterPlugin *plugin,
priv->desktop1 = workspace0;
priv->desktop2 = workspace1;
priv->tml_switch_workspace2 =
clutter_effect_scale (priv->switch_workspace_effect,
workspace1, 1.0, 1.0,
on_switch_workspace_effect_complete,
(gpointer)sw_data);
priv->tml_switch_workspace1 =
clutter_effect_scale (priv->switch_workspace_effect,
workspace0, 0.0, 0.0,
NULL, NULL);
animation = clutter_actor_animate (workspace0, CLUTTER_EASE_IN_SINE,
SWITCH_TIMEOUT,
"scale-x", 1.0,
"scale-y", 1.0,
NULL);
priv->tml_switch_workspace1 = clutter_animation_get_timeline (animation);
g_signal_connect (priv->tml_switch_workspace1,
"completed",
G_CALLBACK (on_switch_workspace_effect_complete),
sw_data);
animation = clutter_actor_animate (workspace1, CLUTTER_EASE_IN_SINE,
SWITCH_TIMEOUT,
"scale-x", 0.0,
"scale-y", 0.0,
NULL);
priv->tml_switch_workspace2 = clutter_animation_get_timeline (animation);
}
......@@ -453,30 +432,32 @@ switch_workspace (MutterPlugin *plugin,
* calls the manager callback function.
*/
static void
on_minimize_effect_complete (ClutterActor *actor, gpointer data)
on_minimize_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data)
{
/*
* Must reverse the effect of the effect; must hide it first to ensure
* that the restoration will not be visible.
*/
MutterPlugin *plugin = data;
MutterPlugin *plugin = data->plugin;
ActorPrivate *apriv;
MutterWindow *mc_window = MUTTER_WINDOW (actor);
MutterWindow *mc_window = MUTTER_WINDOW (data->actor);
apriv = get_actor_private (MUTTER_WINDOW (actor));
apriv = get_actor_private (MUTTER_WINDOW (data->actor));
apriv->tml_minimize = NULL;
clutter_actor_hide (actor);
clutter_actor_hide (data->actor);
/* FIXME - we shouldn't assume the original scale, it should be saved
* at the start of the effect */
clutter_actor_set_scale (actor, 1.0, 1.0);
clutter_actor_move_anchor_point_from_gravity (actor,
clutter_actor_set_scale (data->actor, 1.0, 1.0);
clutter_actor_move_anchor_point_from_gravity (data->actor,
CLUTTER_GRAVITY_NORTH_WEST);
/* Now notify the manager that we are done with this effect */
mutter_plugin_effect_completed (plugin, mc_window,
MUTTER_PLUGIN_MINIMIZE);
g_free (data);
}
/*
......@@ -486,7 +467,6 @@ on_minimize_effect_complete (ClutterActor *actor, gpointer data)
static void
minimize (MutterPlugin *plugin, MutterWindow *mc_window)
{
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
MetaCompWindowType type;
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
......@@ -494,6 +474,8 @@ minimize (MutterPlugin *plugin, MutterWindow *mc_window)
if (type == META_COMP_WINDOW_NORMAL)
{
ClutterAnimation *animation;
EffectCompleteData *data = g_new0 (EffectCompleteData, 1);
ActorPrivate *apriv = get_actor_private (mc_window);
apriv->is_minimized = TRUE;
......@@ -501,13 +483,19 @@ minimize (MutterPlugin *plugin, MutterWindow *mc_window)
clutter_actor_move_anchor_point_from_gravity (actor,
CLUTTER_GRAVITY_CENTER);
apriv->tml_minimize = clutter_effect_scale (priv->minimize_effect,
actor,
0.0,
0.0,
(ClutterEffectCompleteFunc)
on_minimize_effect_complete,
plugin);
animation = clutter_actor_animate (actor,
CLUTTER_EASE_IN_SINE,
MINIMIZE_TIMEOUT,
"scale-x", 0.0,
"scale-y", 0.0,
NULL);
apriv->tml_minimize = clutter_animation_get_timeline (animation);
data->plugin = plugin;
data->actor = actor;
g_signal_connect (apriv->tml_minimize, "completed",
G_CALLBACK (on_minimize_effect_complete),
data);
}
else
mutter_plugin_effect_completed (plugin, mc_window,
......@@ -519,25 +507,27 @@ minimize (MutterPlugin *plugin, MutterWindow *mc_window)
* calls the manager callback function.
*/
static void
on_maximize_effect_complete (ClutterActor *actor, gpointer data)
on_maximize_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data)
{
/*
* Must reverse the effect of the effect.
*/
MutterPlugin * plugin = data;
MutterWindow *mc_window = MUTTER_WINDOW (actor);
MutterPlugin * plugin = data->plugin;
MutterWindow *mc_window = MUTTER_WINDOW (data->actor);
ActorPrivate *apriv = get_actor_private (mc_window);
apriv->tml_maximize = NULL;
/* FIXME - don't assume the original scale was 1.0 */
clutter_actor_set_scale (actor, 1.0, 1.0);
clutter_actor_move_anchor_point_from_gravity (actor,
clutter_actor_set_scale (data->actor, 1.0, 1.0);
clutter_actor_move_anchor_point_from_gravity (data->actor,
CLUTTER_GRAVITY_NORTH_WEST);
/* Now notify the manager that we are done with this effect */
mutter_plugin_effect_completed (plugin, mc_window,
MUTTER_PLUGIN_MAXIMIZE);
g_free (data);
}
/*
......@@ -553,7 +543,6 @@ maximize (MutterPlugin *plugin,
MutterWindow *mc_window,
gint end_x, gint end_y, gint end_width, gint end_height)
{
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
MetaCompWindowType type;
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
......@@ -566,6 +555,8 @@ maximize (MutterPlugin *plugin,
if (type == META_COMP_WINDOW_NORMAL)
{
ClutterAnimation *animation;
EffectCompleteData *data = g_new0 (EffectCompleteData, 1);
ActorPrivate *apriv = get_actor_private (mc_window);
guint width, height;
gint x, y;
......@@ -589,15 +580,18 @@ maximize (MutterPlugin *plugin,
clutter_actor_move_anchor_point (actor, anchor_x, anchor_y);
apriv->tml_maximize =
clutter_effect_scale (priv->maximize_effect,
actor,
scale_x,
scale_y,
(ClutterEffectCompleteFunc)
on_maximize_effect_complete,
plugin);
animation = clutter_actor_animate (actor,
CLUTTER_EASE_IN_SINE,
MAXIMIZE_TIMEOUT,
"scale-x", scale_x,
"scale-y", scale_y,
NULL);
apriv->tml_maximize = clutter_animation_get_timeline (animation);
data->plugin = plugin;
data->actor = actor;
g_signal_connect (apriv->tml_maximize, "completed",
G_CALLBACK (on_maximize_effect_complete),
data);
return;
}
......@@ -630,22 +624,24 @@ unmaximize (MutterPlugin *plugin,
}
static void
on_map_effect_complete (ClutterActor *actor, gpointer data)
on_map_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data)
{
/*
* Must reverse the effect of the effect.
*/
MutterPlugin *plugin = data;
MutterWindow *mc_window = MUTTER_WINDOW (actor);
MutterPlugin *plugin = data->plugin;
MutterWindow *mc_window = MUTTER_WINDOW (data->actor);
ActorPrivate *apriv = get_actor_private (mc_window);
apriv->tml_map = NULL;
clutter_actor_move_anchor_point_from_gravity (actor,
clutter_actor_move_anchor_point_from_gravity (data->actor,
CLUTTER_GRAVITY_NORTH_WEST);
/* Now notify the manager that we are done with this effect */
mutter_plugin_effect_completed (plugin, mc_window, MUTTER_PLUGIN_MAP);
g_free (data);
}
/*
......@@ -655,7 +651,6 @@ on_map_effect_complete (ClutterActor *actor, gpointer data)
static void
map (MutterPlugin *plugin, MutterWindow *mc_window)
{
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
MetaCompWindowType type;
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
......@@ -663,6 +658,8 @@ map (MutterPlugin *plugin, MutterWindow *mc_window)
if (type == META_COMP_WINDOW_NORMAL)
{
ClutterAnimation *animation;
EffectCompleteData *data = g_new0 (EffectCompleteData, 1);
ActorPrivate *apriv = get_actor_private (mc_window);
clutter_actor_move_anchor_point_from_gravity (actor,
......@@ -671,13 +668,18 @@ map (MutterPlugin *plugin, MutterWindow *mc_window)
clutter_actor_set_scale (actor, 0.0, 0.0);
clutter_actor_show (actor);
apriv->tml_map = clutter_effect_scale (priv->map_effect,
actor,
1.0,
1.0,
(ClutterEffectCompleteFunc)
on_map_effect_complete,
plugin);
animation = clutter_actor_animate (actor,
CLUTTER_EASE_IN_SINE,
MAP_TIMEOUT,
"scale-x", 1.0,
"scale-y", 1.0,
NULL);
apriv->tml_map = clutter_animation_get_timeline (animation);
data->actor = actor;
data->plugin = plugin;
g_signal_connect (apriv->tml_map, "completed",
G_CALLBACK (on_map_effect_complete),
data);
apriv->is_minimized = FALSE;
......@@ -692,10 +694,10 @@ map (MutterPlugin *plugin, MutterWindow *mc_window)
* further action than notifying the manager that the effect is completed.
*/
static void
on_destroy_effect_complete (ClutterActor *actor, gpointer data)
on_destroy_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data)
{
MutterPlugin *plugin = data;
MutterWindow *mc_window = MUTTER_WINDOW (actor);
MutterPlugin *plugin = data->plugin;
MutterWindow *mc_window = MUTTER_WINDOW (data->actor);
ActorPrivate *apriv = get_actor_private (mc_window);
apriv->tml_destroy = NULL;
......@@ -710,7 +712,6 @@ on_destroy_effect_complete (ClutterActor *actor, gpointer data)
static void
destroy (MutterPlugin *plugin, MutterWindow *mc_window)
{
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
MetaCompWindowType type;
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
......@@ -718,18 +719,25 @@ destroy (MutterPlugin *plugin, MutterWindow *mc_window)
if (type == META_COMP_WINDOW_NORMAL)
{
ClutterAnimation *animation;
EffectCompleteData *data = g_new0 (EffectCompleteData, 1);
ActorPrivate *apriv = get_actor_private (mc_window);
clutter_actor_move_anchor_point_from_gravity (actor,
CLUTTER_GRAVITY_CENTER);
apriv->tml_destroy = clutter_effect_scale (priv->destroy_effect,
actor,
1.0,
0.0,
(ClutterEffectCompleteFunc)
on_destroy_effect_complete,
plugin);
animation = clutter_actor_animate (actor,
CLUTTER_EASE_IN_SINE,
DESTROY_TIMEOUT,
"scale-x", 0.0,
"scale-y", 1.0,
NULL);
apriv->tml_destroy = clutter_animation_get_timeline (animation);
data->plugin = plugin;
data->actor = actor;
g_signal_connect (apriv->tml_destroy, "completed",
G_CALLBACK (on_destroy_effect_complete),
data);
}
else
mutter_plugin_effect_completed (plugin, mc_window,
......@@ -740,7 +748,6 @@ static void
kill_effect (MutterPlugin *plugin, MutterWindow *mc_window, gulong event)
{
ActorPrivate *apriv;
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
if (event & MUTTER_PLUGIN_SWITCH_WORKSPACE)
{
......@@ -750,7 +757,7 @@ kill_effect (MutterPlugin *plugin, MutterWindow *mc_window, gulong event)
{
clutter_timeline_stop (priv->tml_switch_workspace1);
clutter_timeline_stop (priv->tml_switch_workspace2);
on_switch_workspace_effect_complete (priv->desktop1, priv->actors);
g_signal_emit_by_name (priv->tml_switch_workspace1, "completed", NULL);
}
if (!(event & ~MUTTER_PLUGIN_SWITCH_WORKSPACE))
......@@ -765,25 +772,25 @@ kill_effect (MutterPlugin *plugin, MutterWindow *mc_window, gulong event)
if ((event & MUTTER_PLUGIN_MINIMIZE) && apriv->tml_minimize)
{
clutter_timeline_stop (apriv->tml_minimize);
on_minimize_effect_complete (actor, NULL);
g_signal_emit_by_name (apriv->tml_minimize, "completed", NULL);
}
if ((event & MUTTER_PLUGIN_MAXIMIZE) && apriv->tml_maximize)
{
clutter_timeline_stop (apriv->tml_maximize);
on_maximize_effect_complete (actor, NULL);
g_signal_emit_by_name (apriv->tml_maximize, "completed", NULL);
}
if ((event & MUTTER_PLUGIN_MAP) && apriv->tml_map)
{
clutter_timeline_stop (apriv->tml_map);
on_map_effect_complete (actor, NULL);
g_signal_emit_by_name (apriv->tml_map, "completed", NULL);
}
if ((event & MUTTER_PLUGIN_DESTROY) && apriv->tml_destroy)
{
clutter_timeline_stop (apriv->tml_destroy);
on_destroy_effect_complete (actor, NULL);
g_signal_emit_by_name (apriv->tml_destroy, "completed", NULL);
}
}
......
......@@ -102,7 +102,7 @@ tidy_texture_frame_paint (ClutterActor *self)
ty2 = CLUTTER_INT_TO_FIXED (tex_height - priv->bottom) / tex_height;
col.alpha = clutter_actor_get_paint_opacity (self);
cogl_color (&col);
cogl_set_source_color4ub (col.red, col.green, col.blue, col.alpha);
ex = width - priv->right;
if (ex < 0)
......@@ -115,41 +115,42 @@ tidy_texture_frame_paint (ClutterActor *self)
#define FX(x) CLUTTER_INT_TO_FIXED(x)
/* top left corner */
cogl_texture_rectangle (cogl_texture,
0,
0,
FX(priv->left), /* FIXME: clip if smaller */
FX(priv->top),
0,
0,
tx1,
ty1);
cogl_set_source_texture (cogl_texture);
cogl_rectangle_with_texture_coords (0,
0,
FX(priv->left), /* FIXME: clip if smaller */
FX(priv->top),
0,
0,
tx1,
ty1);
/* top middle */
cogl_texture_rectangle (cogl_texture,
FX(priv->left),
FX(priv->top),
FX(ex),
0,
tx1,
0,
tx2,
ty1);
cogl_set_source_texture (cogl_texture);
cogl_rectangle_with_texture_coords (FX(priv->left),
0,
FX(ex),
FX(priv->top),
tx1,
0,
tx2,
ty1);
/* top right */
cogl_texture_rectangle (cogl_texture,
FX(ex),
0,
FX(width),
FX(priv->top),
tx2,
0,
CFX_ONE,
ty1);
cogl_set_source_texture (cogl_texture);
cogl_rectangle_with_texture_coords (FX(ex),
0,
FX(width),
FX(priv->top),
tx2,
0,
CFX_ONE,
ty1);
/* mid left */
cogl_texture_rectangle (cogl_texture,
0,
cogl_set_source_texture (cogl_texture);
cogl_rectangle_with_texture_coords (
0,
FX(priv->top),
FX(priv->left),
FX(ey),
......@@ -159,7 +160,8 @@ tidy_texture_frame_paint (ClutterActor *self)
ty2);
/* center */
cogl_texture_rectangle (cogl_texture,
cogl_set_source_texture (cogl_texture);
cogl_rectangle_with_texture_coords (
FX(priv->left),
FX(priv->top),
FX(ex),
......@@ -170,7 +172,8 @@ tidy_texture_frame_paint (ClutterActor *self)
ty2);
/* mid right */
cogl_texture_rectangle (cogl_texture,
cogl_set_source_texture (cogl_texture);
cogl_rectangle_with_texture_coords (
FX(ex),
FX(priv->top),
FX(width),
......@@ -179,10 +182,11 @@ tidy_texture_frame_paint (ClutterActor *self)
ty1,
CFX_ONE,
ty2);
/* bottom left */
cogl_texture_rectangle (cogl_texture,
0,
cogl_set_source_texture (cogl_texture);
cogl_rectangle_with_texture_coords (
0,
FX(ey),
FX(priv->left),
FX(height),
......@@ -192,7 +196,8 @@ tidy_texture_frame_paint (ClutterActor *self)
CFX_ONE);
/* bottom center */
cogl_texture_rectangle (cogl_texture,
cogl_set_source_texture (cogl_texture);
cogl_rectangle_with_texture_coords (
FX(priv->left),
FX(ey),
FX(ex),
......@@ -203,7 +208,8 @@ tidy_texture_frame_paint (ClutterActor *self)
CFX_ONE);
/* bottom right */
cogl_texture_rectangle (cogl_texture,
cogl_set_source_texture (cogl_texture);
cogl_rectangle_with_texture_coords (
FX(ex),
FX(ey),
FX(width),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment