From 65d0ce607efe6cbc72e3f1f4518c8cf5d038ceee Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Tue, 23 Nov 2010 14:31:45 +0000 Subject: [PATCH] stage: Report an unknown paint volume. Previously we were leaving it up to the default implementation of get_paint_volume in ClutterGroup to handle the stage by determining the bounding box of all contained children. This isn't the true bounding box of the stage though since the stage is responsible for clearing the entire framebuffer at the start of the frame. This adds a get_paint_volume implementation for ClutterStage which simply returns False which means Clutter has to assume it covers everything. --- clutter/clutter-stage.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index ebc94e982..909d21537 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -455,6 +455,15 @@ clutter_stage_pick (ClutterActor *self, NULL); } +static gboolean +clutter_stage_get_paint_volume (ClutterActor *self, + ClutterPaintVolume *volume) +{ + /* Returning False effectively means Clutter has to assume it covers + * everything... */ + return FALSE; +} + static void clutter_stage_realize (ClutterActor *self) { @@ -1211,6 +1220,7 @@ clutter_stage_class_init (ClutterStageClass *klass) actor_class->get_preferred_height = clutter_stage_get_preferred_height; actor_class->paint = clutter_stage_paint; actor_class->pick = clutter_stage_pick; + actor_class->get_paint_volume = clutter_stage_get_paint_volume; actor_class->realize = clutter_stage_realize; actor_class->unrealize = clutter_stage_unrealize; actor_class->show = clutter_stage_show;