1
0
Fork 0

Merge branch 'master' into msvc-support-master

This commit is contained in:
Chun-wei Fan 2011-10-20 15:41:46 +08:00
commit d6af2e54c8
7 changed files with 681 additions and 676 deletions

View file

@ -210,17 +210,6 @@ clutter_blur_effect_pre_paint (ClutterEffect *effect)
return parent_class->pre_paint (effect);
}
static CoglHandle
clutter_blur_effect_create_texture (ClutterOffscreenEffect *effect,
gfloat min_width,
gfloat min_height)
{
return cogl_texture_new_with_size (min_width + (2 * BLUR_PADDING),
min_height + (2 * BLUR_PADDING),
COGL_TEXTURE_NO_SLICING,
COGL_PIXEL_FORMAT_RGBA_8888_PRE);
}
static void
clutter_blur_effect_paint_target (ClutterOffscreenEffect *effect)
{
@ -303,7 +292,6 @@ clutter_blur_effect_class_init (ClutterBlurEffectClass *klass)
effect_class->get_paint_volume = clutter_blur_effect_get_paint_volume;
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
offscreen_class->create_texture = clutter_blur_effect_create_texture;
offscreen_class->paint_target = clutter_blur_effect_paint_target;
}

View file

@ -154,19 +154,17 @@ clutter_clone_apply_transform (ClutterActor *self, CoglMatrix *matrix)
}
static void
clutter_clone_paint (ClutterActor *self)
clutter_clone_paint (ClutterActor *actor)
{
ClutterClone *clone = CLUTTER_CLONE (self);
ClutterClonePrivate *priv = clone->priv;
ClutterClone *self = CLUTTER_CLONE (actor);
ClutterClonePrivate *priv = self->priv;
gboolean was_unmapped = FALSE;
if (priv->clone_source == NULL)
return;
CLUTTER_NOTE (PAINT,
"painting clone actor '%s'",
clutter_actor_get_name (self) ? clutter_actor_get_name (self)
: "unknown");
CLUTTER_NOTE (PAINT, "painting clone actor '%s'",
_clutter_actor_get_debug_name (actor));
/* The final bits of magic:
* - We need to override the paint opacity of the actor with our own
@ -178,7 +176,7 @@ clutter_clone_paint (ClutterActor *self)
*/
_clutter_actor_set_in_clone_paint (priv->clone_source, TRUE);
_clutter_actor_set_opacity_override (priv->clone_source,
clutter_actor_get_paint_opacity (self));
clutter_actor_get_paint_opacity (actor));
_clutter_actor_set_enable_model_view_transform (priv->clone_source, FALSE);
if (!CLUTTER_ACTOR_IS_MAPPED (priv->clone_source))
@ -200,10 +198,10 @@ clutter_clone_paint (ClutterActor *self)
}
static gboolean
clutter_clone_get_paint_volume (ClutterActor *self,
clutter_clone_get_paint_volume (ClutterActor *actor,
ClutterPaintVolume *volume)
{
ClutterClonePrivate *priv = CLUTTER_CLONE (self)->priv;
ClutterClonePrivate *priv = CLUTTER_CLONE (actor)->priv;
const ClutterPaintVolume *source_volume;
/* if the source is not set the paint volume is defined to be empty */
@ -213,18 +211,19 @@ clutter_clone_get_paint_volume (ClutterActor *self,
/* query the volume of the source actor and simply masquarade it as
* the clones volume... */
source_volume = clutter_actor_get_paint_volume (priv->clone_source);
if (!source_volume)
if (source_volume == NULL)
return FALSE;
_clutter_paint_volume_set_from_volume (volume, source_volume);
_clutter_paint_volume_set_reference_actor (volume, self);
_clutter_paint_volume_set_reference_actor (volume, actor);
return TRUE;
}
static gboolean
clutter_clone_has_overlaps (ClutterActor *self)
clutter_clone_has_overlaps (ClutterActor *actor)
{
ClutterClonePrivate *priv = CLUTTER_CLONE (self)->priv;
ClutterClonePrivate *priv = CLUTTER_CLONE (actor)->priv;
/* The clone has overlaps iff the source has overlaps */
@ -249,15 +248,21 @@ clutter_clone_allocate (ClutterActor *self,
if (priv->clone_source == NULL)
return;
#if 0
/* XXX - this is wrong: ClutterClone cannot clone unparented
* actors, as it will break all invariants
*/
/* we act like a "foster parent" for the source we are cloning;
* if the source has not been parented we have to force an
* allocation on it, so that we can paint it correctly from
* within out paint() implementation. since the actor does not
* within our paint() implementation. since the actor does not
* have a parent, and thus it won't be painted by the usual
* paint cycle, we can safely give it as much size as it requires
*/
if (clutter_actor_get_parent (priv->clone_source) == NULL)
clutter_actor_allocate_preferred_size (priv->clone_source, flags);
#endif
}
static void
@ -266,12 +271,12 @@ clutter_clone_set_property (GObject *gobject,
const GValue *value,
GParamSpec *pspec)
{
ClutterClone *clone = CLUTTER_CLONE (gobject);
ClutterClone *self = CLUTTER_CLONE (gobject);
switch (prop_id)
{
case PROP_SOURCE:
clutter_clone_set_source (clone, g_value_get_object (value));
clutter_clone_set_source (self, g_value_get_object (value));
break;
default:
@ -316,15 +321,15 @@ clutter_clone_class_init (ClutterCloneClass *klass)
g_type_class_add_private (gobject_class, sizeof (ClutterClonePrivate));
actor_class->apply_transform = clutter_clone_apply_transform;
actor_class->paint = clutter_clone_paint;
actor_class->get_paint_volume = clutter_clone_get_paint_volume;
actor_class->get_preferred_width = clutter_clone_get_preferred_width;
actor_class->apply_transform = clutter_clone_apply_transform;
actor_class->paint = clutter_clone_paint;
actor_class->get_paint_volume = clutter_clone_get_paint_volume;
actor_class->get_preferred_width = clutter_clone_get_preferred_width;
actor_class->get_preferred_height = clutter_clone_get_preferred_height;
actor_class->allocate = clutter_clone_allocate;
actor_class->has_overlaps = clutter_clone_has_overlaps;
actor_class->allocate = clutter_clone_allocate;
actor_class->has_overlaps = clutter_clone_has_overlaps;
gobject_class->dispose = clutter_clone_dispose;
gobject_class->dispose = clutter_clone_dispose;
gobject_class->set_property = clutter_clone_set_property;
gobject_class->get_property = clutter_clone_get_property;
@ -343,9 +348,7 @@ clutter_clone_class_init (ClutterCloneClass *klass)
G_PARAM_CONSTRUCT |
CLUTTER_PARAM_READWRITE);
g_object_class_install_properties (gobject_class,
PROP_LAST,
obj_props);
g_object_class_install_properties (gobject_class, PROP_LAST, obj_props);
}
static void
@ -377,84 +380,84 @@ clutter_clone_new (ClutterActor *source)
static void
clone_source_queue_redraw_cb (ClutterActor *source,
ClutterActor *origin,
ClutterClone *clone)
ClutterClone *self)
{
clutter_actor_queue_redraw (CLUTTER_ACTOR (clone));
clutter_actor_queue_redraw (CLUTTER_ACTOR (self));
}
static void
clone_source_queue_relayout_cb (ClutterActor *source,
ClutterClone *clone)
ClutterClone *self)
{
clutter_actor_queue_relayout (CLUTTER_ACTOR (clone));
clutter_actor_queue_relayout (CLUTTER_ACTOR (self));
}
static void
clutter_clone_set_source_internal (ClutterClone *clone,
clutter_clone_set_source_internal (ClutterClone *self,
ClutterActor *source)
{
ClutterClonePrivate *priv = clone->priv;
ClutterClonePrivate *priv = self->priv;
if (priv->clone_source)
if (priv->clone_source != NULL)
{
g_signal_handlers_disconnect_by_func (priv->clone_source,
(void *) clone_source_queue_redraw_cb,
clone);
G_CALLBACK (clone_source_queue_redraw_cb),
self);
g_signal_handlers_disconnect_by_func (priv->clone_source,
(void *) clone_source_queue_relayout_cb,
clone);
G_CALLBACK (clone_source_queue_relayout_cb),
self);
g_object_unref (priv->clone_source);
priv->clone_source = NULL;
}
if (source)
if (source != NULL)
{
priv->clone_source = g_object_ref (source);
g_signal_connect (priv->clone_source, "queue-redraw",
G_CALLBACK (clone_source_queue_redraw_cb), clone);
G_CALLBACK (clone_source_queue_redraw_cb), self);
g_signal_connect (priv->clone_source, "queue-relayout",
G_CALLBACK (clone_source_queue_relayout_cb), clone);
G_CALLBACK (clone_source_queue_relayout_cb), self);
}
g_object_notify_by_pspec (G_OBJECT (clone), obj_props[PROP_SOURCE]);
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_SOURCE]);
clutter_actor_queue_relayout (CLUTTER_ACTOR (clone));
clutter_actor_queue_relayout (CLUTTER_ACTOR (self));
}
/**
* clutter_clone_set_source:
* @clone: a #ClutterClone
* @source: a #ClutterActor, or %NULL
* @self: a #ClutterClone
* @source: (allow-none): a #ClutterActor, or %NULL
*
* Sets @source as the source actor to be cloned by @clone.
* Sets @source as the source actor to be cloned by @self.
*
* Since: 1.0
*/
void
clutter_clone_set_source (ClutterClone *clone,
clutter_clone_set_source (ClutterClone *self,
ClutterActor *source)
{
g_return_if_fail (CLUTTER_IS_CLONE (clone));
g_return_if_fail (CLUTTER_IS_CLONE (self));
g_return_if_fail (source == NULL || CLUTTER_IS_ACTOR (source));
clutter_clone_set_source_internal (clone, source);
clutter_actor_queue_relayout (CLUTTER_ACTOR (clone));
clutter_clone_set_source_internal (self, source);
clutter_actor_queue_relayout (CLUTTER_ACTOR (self));
}
/**
* clutter_clone_get_source:
* @clone: a #ClutterClone
* @self: a #ClutterClone
*
* Retrieves the source #ClutterActor being cloned by @clone
* Retrieves the source #ClutterActor being cloned by @self.
*
* Return value: (transfer none): the actor source for the clone
*
* Since: 1.0
*/
ClutterActor *
clutter_clone_get_source (ClutterClone *clone)
clutter_clone_get_source (ClutterClone *self)
{
g_return_val_if_fail (CLUTTER_IS_CLONE (clone), NULL);
g_return_val_if_fail (CLUTTER_IS_CLONE (self), NULL);
return clone->priv->clone_source;
return self->priv->clone_source;
}

View file

@ -81,9 +81,9 @@ struct _ClutterCloneClass
GType clutter_clone_get_type (void) G_GNUC_CONST;
ClutterActor *clutter_clone_new (ClutterActor *source);
void clutter_clone_set_source (ClutterClone *clone,
void clutter_clone_set_source (ClutterClone *self,
ClutterActor *source);
ClutterActor *clutter_clone_get_source (ClutterClone *clone);
ClutterActor *clutter_clone_get_source (ClutterClone *self);
G_END_DECLS

View file

@ -179,21 +179,14 @@ FLAVOUR_CFLAGS=""
CLUTTER_WINSYS_BASE=
CLUTTER_WINSYS_BASE_LIB=
CLUTTER_WINSYS=
glesversion=1.1
use_gles2_wrapper=no
experimental_backend=no
experimental_image=no
AC_ARG_WITH([flavour],
[AS_HELP_STRING([--with-flavour=@<:@glx/opengl-egl-xlib/wayland/eglx/eglnative/osx/win32/cex100@:>@],
[Select the Clutter window system backend])],
[CLUTTER_FLAVOUR=$with_flavour])
AC_ARG_WITH([gles],
[AS_HELP_STRING([--with-gles=@<:@1.1/2.0@:>@],
[Select Clutter GLES version (for EGL backends)])],
[glesversion=$with_gles])
# base dependencies for core
CLUTTER_BASE_PC_FILES="cogl-1.0 >= $COGL_REQ_VERSION cairo-gobject >= $CAIRO_REQ_VERSION atk >= $ATK_REQ_VERSION pangocairo >= $PANGO_REQ_VERSION cogl-pango-1.0 json-glib-1.0 >= $JSON_GLIB_REQ_VERSION"
@ -404,14 +397,6 @@ AS_IF([test "x$SUPPORT_X11" = "x1"],
AS_IF([test "x$SUPPORT_GLX" = "x1"],
[
AC_DEFINE([HAVE_CLUTTER_GLX], [1], [Have the GLX backend])
AC_CHECK_HEADERS([GL/glx.h],
[],
[AC_MSG_ERROR([Unable to locate required GLX headers])])
AC_CHECK_LIB(GL, [glXCreateContext],
[HAVE_LIBGLX=yes],
[AC_MSG_ERROR([Required GLX library not found])])
])
AS_IF([test "x$SUPPORT_WAYLAND" = "x1"],
@ -1061,9 +1046,7 @@ fi
echo ""
# General warning about experimental features
if test "x$experimental_backend" = "xyes" ||
test "x$experimental_image" = "xyes"
then
if test "x$experimental_backend" = "xyes"; then
echo ""
echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
echo " *WARNING*"

1200
po/nb.po

File diff suppressed because it is too large Load diff

View file

@ -55,8 +55,8 @@ shader_paint (ClutterEffect *effect,
"uniform float step;\n"
"void main (void)\n"
"{\n"
" gl_FragColor = texture2D(tex, vec2 (gl_TexCoord[0].s + step,\n"
" gl_TexCoord[0].t));\n"
" cogl_color_out = texture2D(tex, vec2 (cogl_tex_coord_in[0].s + step,\n"
" cogl_tex_coord_in[0].t));\n"
"}\n");
tex_width = clutter_actor_get_width (actor);

View file

@ -36,8 +36,7 @@ typedef struct
* correctly).
*/
#define FRAGMENT_SHADER_END \
" gl_FragColor = color;" \
" gl_FragColor = gl_FragColor * cogl_color_in;" \
" cogl_color_out = color * cogl_color_in;" \
"}"
static ShaderSource shaders[]=