clutter/paint-nodes: Expose ClutterRootNode

The ClutterRootNode paint node is theoretically the
top-most node of a paint nodes tree, except that we
are not in the point of having full rendering trees
in Clutter (all rendering performed by paint nodes
is still local and immediate).

When controlling the rendering tree, MetaShapedTexture
may need to paint into an offscreen framebuffer under
some circumstations.

Expose ClutterRootNode so that MetaShapedTexture can
use it to render to offscreen framebuffers.

parent 02b184bf
......@@ -3740,7 +3740,7 @@ clutter_actor_paint_node (ClutterActor *actor,
if (!clutter_stage_get_no_clear_hint (CLUTTER_STAGE (actor)))
clear_flags |= COGL_BUFFER_BIT_COLOR;
node = _clutter_root_node_new (fb, &bg_color, clear_flags);
node = clutter_root_node_new (fb, &bg_color, clear_flags);
clutter_paint_node_set_name (node, "stageClear");
clutter_paint_node_add_rectangle (node, &box);
clutter_paint_node_add_child (root, node);
......@@ -97,7 +97,6 @@ struct _ClutterPaintOperation
} op;
GType _clutter_root_node_get_type (void) G_GNUC_CONST;
GType _clutter_transform_node_get_type (void) G_GNUC_CONST;
GType _clutter_dummy_node_get_type (void) G_GNUC_CONST;
......@@ -110,9 +109,6 @@ void _clutter_paint_operation_paint_primitive (const C
void _clutter_paint_node_init_types (void);
gpointer _clutter_paint_node_create (GType gtype);
ClutterPaintNode * _clutter_root_node_new (CoglFramebuffer *framebuffer,
const ClutterColor *clear_color,
CoglBufferBit clear_flags);
ClutterPaintNode * _clutter_transform_node_new (const CoglMatrix *matrix);
ClutterPaintNode * _clutter_dummy_node_new (ClutterActor *actor);
......@@ -83,16 +83,13 @@ _clutter_paint_node_init_types (void)
* Root node, private
* Root node
* any frame can only have a since RootNode instance for each
* top-level actor.
#define clutter_root_node_get_type _clutter_root_node_get_type
typedef struct _ClutterRootNode ClutterRootNode;
typedef struct _ClutterPaintNodeClass ClutterRootNodeClass;
#define clutter_root_node_get_type clutter_root_node_get_type
struct _ClutterRootNode
......@@ -158,13 +155,13 @@ clutter_root_node_init (ClutterRootNode *self)
ClutterPaintNode *
_clutter_root_node_new (CoglFramebuffer *framebuffer,
const ClutterColor *clear_color,
CoglBufferBit clear_flags)
clutter_root_node_new (CoglFramebuffer *framebuffer,
const ClutterColor *clear_color,
CoglBufferBit clear_flags)
ClutterRootNode *res;
res = _clutter_paint_node_create (_clutter_root_node_get_type ());
res = _clutter_paint_node_create (CLUTTER_TYPE_ROOT_NODE);
cogl_color_init_from_4ub (&res->clear_color,
......@@ -143,6 +143,26 @@ CLUTTER_EXPORT
ClutterPaintNode * clutter_text_node_new (PangoLayout *layout,
const ClutterColor *color);
#define CLUTTER_TYPE_ROOT_NODE (clutter_root_node_get_type ())
* ClutterRootNode:
* The #ClutterRootNode structure is an opaque
* type whose members cannot be directly accessed.
typedef struct _ClutterRootNode ClutterRootNode;
typedef struct _ClutterPaintNodeClass ClutterRootNodeClass;
GType clutter_root_node_get_type (void) G_GNUC_CONST;
ClutterPaintNode * clutter_root_node_new (CoglFramebuffer *framebuffer,
const ClutterColor *clear_color,
CoglBufferBit clear_flags);
#endif /* __CLUTTER_PAINT_NODES_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment