2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-stage.c:
	(clutter_stage_allocate): Check if the stage provided by the
	backend is static (i.e. a framebuffer that cannot be resized)
	and interrupt the allocation chain there.

	* clutter/eglnative/clutter-stage-egl.c:
	(clutter_stage_egl_class_init): Remove the ::allocate empty
	stub.
This commit is contained in:
Emmanuele Bassi 2008-06-25 11:49:43 +00:00
parent b84c5311ee
commit 8b1385ed23
4 changed files with 24 additions and 30 deletions

View File

@ -1,3 +1,14 @@
2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-stage.c:
(clutter_stage_allocate): Check if the stage provided by the
backend is static (i.e. a framebuffer that cannot be resized)
and interrupt the allocation chain there.
* clutter/eglnative/clutter-stage-egl.c:
(clutter_stage_egl_class_init): Remove the ::allocate empty
stub.
2008-06-25 Matthew Allum <mallum@openedhand.com>
* clutter/eglnative/clutter-stage-egl.c:

View File

@ -160,13 +160,20 @@ clutter_stage_allocate (ClutterActor *self,
g_assert (priv->impl != NULL);
CLUTTER_ACTOR_GET_CLASS (priv->impl)->allocate (priv->impl,
box,
origin_changed);
/* if the stage is fixed size (for instance, it's using a frame-buffer)
* then we simply ignore any allocation request and interrupt the
* allocation chain here.
*/
if (clutter_feature_available (CLUTTER_FEATURE_STAGE_STATIC))
{
ClutterActorClass *klass;
CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->allocate (self,
box,
origin_changed);
klass = CLUTTER_ACTOR_CLASS (clutter_stage_parent_class);
klass->allocate (self, box, origin_changed);
klass = CLUTTER_ACTOR_GET_CLASS (priv->impl);
klass->allocate (priv->impl, box, origin_changed);
}
}
static void

View File

@ -238,17 +238,6 @@ clutter_stage_egl_get_preferred_height (ClutterActor *self,
*natural_height_p = CLUTTER_UNITS_FROM_DEVICE (stage_egl->surface_height);
}
static void
clutter_stage_egl_allocate (ClutterActor *self,
const ClutterActorBox *box,
gboolean origin_changed)
{
/* we cannot resize the frame buffer, so we just ignore
* any allocation we receive by simply interrupting the
* allocation chain.
*/
}
static void
clutter_stage_egl_dispose (GObject *gobject)
{
@ -273,7 +262,6 @@ clutter_stage_egl_class_init (ClutterStageEGLClass *klass)
actor_class->unrealize = clutter_stage_egl_unrealize;
actor_class->get_preferred_width = clutter_stage_egl_get_preferred_width;
actor_class->get_preferred_height = clutter_stage_egl_get_preferred_height;
actor_class->allocate = clutter_stage_egl_allocate;
}
static void

View File

@ -217,17 +217,6 @@ clutter_stage_egl_get_preferred_height (ClutterActor *self,
*natural_height_p = CLUTTER_UNITS_FROM_DEVICE (stage_egl->surface_height);
}
static void
clutter_stage_egl_allocate (ClutterActor *self,
const ClutterActorBox *box,
gboolean origin_changed)
{
/* we cannot resize the frame buffer, so we just ignore
* any allocation we receive by simply interrupting the
* allocation chain.
*/
}
static void
clutter_stage_egl_dispose (GObject *gobject)
{
@ -252,7 +241,6 @@ clutter_stage_egl_class_init (ClutterStageEGLClass *klass)
actor_class->unrealize = clutter_stage_egl_unrealize;
actor_class->get_preferred_width = clutter_stage_egl_get_preferred_width;
actor_class->get_preferred_height = clutter_stage_egl_get_preferred_height;
actor_class->allocate = clutter_stage_egl_allocate;
}
static void