[mutter] background-actor: Add a simple paint volume



commit 883c4a7b0f2c3199038fc14575bb2168dbeb7321
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Sep 3 11:07:22 2014 -0700

    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.

 src/compositor/meta-background-actor.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/meta-background-actor.c b/src/compositor/meta-background-actor.c
index 77039c9..4d4651b 100644
--- a/src/compositor/meta-background-actor.c
+++ b/src/compositor/meta-background-actor.c
@@ -403,6 +403,13 @@ paint_clipped_rectangle (CoglFramebuffer       *fb,
                                             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
 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_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;
 
   param_spec = g_param_spec_object ("meta-screen",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]