[mutter] clutter: Add clutter_actor_has_damage() API



commit 6372e3e4dbe546d6b4c9c6d3e3cbbd74797faedc
Author: Jonas Ådahl <jadahl gmail com>
Date:   Wed Jan 23 18:40:07 2019 +0100

    clutter: Add clutter_actor_has_damage() API
    
    Will be used to check whether there are any damage to an actor.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/413

 clutter/clutter/clutter-actor.c  | 7 +++++++
 clutter/clutter/clutter-mutter.h | 3 +++
 2 files changed, 10 insertions(+)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 100b80459..c11bb4cb6 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -635,6 +635,7 @@
 #include "clutter-interval.h"
 #include "clutter-main.h"
 #include "clutter-marshal.h"
+#include "clutter-mutter.h"
 #include "clutter-paint-nodes.h"
 #include "clutter-paint-node-private.h"
 #include "clutter-paint-volume-private.h"
@@ -16467,6 +16468,12 @@ clutter_actor_is_in_clone_paint (ClutterActor *self)
   return FALSE;
 }
 
+gboolean
+clutter_actor_has_damage (ClutterActor *actor)
+{
+  return actor->priv->is_dirty;
+}
+
 static gboolean
 set_direction_recursive (ClutterActor *actor,
                          gpointer      user_data)
diff --git a/clutter/clutter/clutter-mutter.h b/clutter/clutter/clutter-mutter.h
index d5d0340ff..788757140 100644
--- a/clutter/clutter/clutter-mutter.h
+++ b/clutter/clutter/clutter-mutter.h
@@ -49,6 +49,9 @@ void clutter_stage_freeze_updates (ClutterStage *stage);
 CLUTTER_EXPORT
 void clutter_stage_thaw_updates (ClutterStage *stage);
 
+CLUTTER_EXPORT
+gboolean clutter_actor_has_damage (ClutterActor *actor);
+
 #undef __CLUTTER_H_INSIDE__
 
 #endif /* __CLUTTER_MUTTER_H__ */


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