paint-node: Use JSON-GLib for debug serialization

Instead of our homegrown string building; this at least ensures that
we're generating proper data, instead of random strings. Plus, using
JsonNode and JsonBuilder, we can ask the PaintNode subclasses to
serialize themselves in a sensible way.
This commit is contained in:
Emmanuele Bassi
2012-02-03 13:51:29 +00:00
parent 2ee5851970
commit f4d8fb054a
3 changed files with 173 additions and 110 deletions

View File

@ -26,6 +26,7 @@
#define __CLUTTER_PAINT_NODE_PRIVATE_H__
#include <glib-object.h>
#include <json-glib/json-glib.h>
#include <clutter/clutter-paint-node.h>
G_BEGIN_DECLS
@ -65,6 +66,8 @@ struct _ClutterPaintNodeClass
gboolean (* pre_draw) (ClutterPaintNode *node);
void (* draw) (ClutterPaintNode *node);
void (* post_draw) (ClutterPaintNode *node);
JsonNode*(* serialize) (ClutterPaintNode *node);
};
typedef enum {