mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
background-actor: Add a simple paint volume
Not having a paint volume causes every single paint to turn into full-stage redraw, since otherwise culling won't properly work. Since we don't paint outside of our allocation, just use the simple default implementation, but also return TRUE inside it.
This commit is contained in:
parent
d4317ba1e4
commit
883c4a7b0f
@ -403,6 +403,13 @@ paint_clipped_rectangle (CoglFramebuffer *fb,
|
|||||||
tx1, ty1, tx2, ty2);
|
tx1, ty1, tx2, ty2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
meta_background_actor_get_paint_volume (ClutterActor *actor,
|
||||||
|
ClutterPaintVolume *volume)
|
||||||
|
{
|
||||||
|
return clutter_paint_volume_set_from_allocation (volume, actor);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_background_actor_paint (ClutterActor *actor)
|
meta_background_actor_paint (ClutterActor *actor)
|
||||||
{
|
{
|
||||||
@ -549,6 +556,7 @@ meta_background_actor_class_init (MetaBackgroundActorClass *klass)
|
|||||||
|
|
||||||
actor_class->get_preferred_width = meta_background_actor_get_preferred_width;
|
actor_class->get_preferred_width = meta_background_actor_get_preferred_width;
|
||||||
actor_class->get_preferred_height = meta_background_actor_get_preferred_height;
|
actor_class->get_preferred_height = meta_background_actor_get_preferred_height;
|
||||||
|
actor_class->get_paint_volume = meta_background_actor_get_paint_volume;
|
||||||
actor_class->paint = meta_background_actor_paint;
|
actor_class->paint = meta_background_actor_paint;
|
||||||
|
|
||||||
param_spec = g_param_spec_object ("meta-screen",
|
param_spec = g_param_spec_object ("meta-screen",
|
||||||
|
Loading…
Reference in New Issue
Block a user