[mutter/gbsneto/more-clutter-api: 3/3] clutter/paint-nodes: Expose ClutterLayerNode
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/more-clutter-api: 3/3] clutter/paint-nodes: Expose ClutterLayerNode
- Date: Tue, 22 Jan 2019 21:33:10 +0000 (UTC)
commit 947cdf16eea0e1cc4bc78930358356755720ff7b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jan 22 19:13:00 2019 -0200
clutter/paint-nodes: Expose ClutterLayerNode
ClutterLayerNode is a private paint node that paints the
contents of its subnodes into an offscreen buffer, then
paints this entire offscreen buffer at the previous draw
framebuffer with the given opacity.
It is specially interesting to the future ClutterContent
implementation of MetaShapedTexture, for the NVidia and
rotation cases where the contents are painted on an
offscreen.
Because of this immediate use, expose ClutterLayerNode
as public API.
clutter/clutter/clutter-paint-node-private.h | 24 ------------------------
clutter/clutter/clutter-paint-nodes.c | 14 ++++++--------
clutter/clutter/clutter-paint-nodes.h | 23 +++++++++++++++++++++++
3 files changed, 29 insertions(+), 32 deletions(-)
---
diff --git a/clutter/clutter/clutter-paint-node-private.h b/clutter/clutter/clutter-paint-node-private.h
index feecdd811..9ac51578c 100644
--- a/clutter/clutter/clutter-paint-node-private.h
+++ b/clutter/clutter/clutter-paint-node-private.h
@@ -145,30 +145,6 @@ ClutterPaintNode * clutter_paint_node_get_parent (Clutter
G_GNUC_INTERNAL
CoglFramebuffer * clutter_paint_node_get_framebuffer (ClutterPaintNode *node);
-#define CLUTTER_TYPE_LAYER_NODE (_clutter_layer_node_get_type ())
-#define CLUTTER_LAYER_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_LAYER_NODE,
ClutterLayerNode))
-#define CLUTTER_IS_LAYER_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_LAYER_NODE))
-
-/*
- * ClutterLayerNode:
- *
- * The #ClutterLayerNode structure is an opaque
- * type whose members cannot be directly accessed.
- *
- * Since: 1.10
- */
-typedef struct _ClutterLayerNode ClutterLayerNode;
-typedef struct _ClutterLayerNodeClass ClutterLayerNodeClass;
-
-GType _clutter_layer_node_get_type (void) G_GNUC_CONST;
-
-ClutterPaintNode * _clutter_layer_node_new (const CoglMatrix *projection,
- const cairo_rectangle_t *viewport,
- float width,
- float height,
- guint8 opacity);
-
-
G_END_DECLS
#endif /* __CLUTTER_PAINT_NODE_PRIVATE_H__ */
diff --git a/clutter/clutter/clutter-paint-nodes.c b/clutter/clutter/clutter-paint-nodes.c
index 9562a3f01..5d33d411f 100644
--- a/clutter/clutter/clutter-paint-nodes.c
+++ b/clutter/clutter/clutter-paint-nodes.c
@@ -1079,11 +1079,9 @@ clutter_clip_node_new (void)
}
/*
- * ClutterLayerNode (private)
+ * ClutterLayerNode
*/
-#define clutter_layer_node_get_type _clutter_layer_node_get_type
-
struct _ClutterLayerNode
{
ClutterPaintNode parent_instance;
@@ -1269,11 +1267,11 @@ clutter_layer_node_init (ClutterLayerNode *self)
* Since: 1.10
*/
ClutterPaintNode *
-_clutter_layer_node_new (const CoglMatrix *projection,
- const cairo_rectangle_t *viewport,
- float width,
- float height,
- guint8 opacity)
+clutter_layer_node_new (const CoglMatrix *projection,
+ const cairo_rectangle_t *viewport,
+ float width,
+ float height,
+ guint8 opacity)
{
ClutterLayerNode *res;
CoglColor color;
diff --git a/clutter/clutter/clutter-paint-nodes.h b/clutter/clutter/clutter-paint-nodes.h
index 381c7f8a7..97431c8bf 100644
--- a/clutter/clutter/clutter-paint-nodes.h
+++ b/clutter/clutter/clutter-paint-nodes.h
@@ -143,6 +143,29 @@ CLUTTER_EXPORT
ClutterPaintNode * clutter_text_node_new (PangoLayout *layout,
const ClutterColor *color);
+#define CLUTTER_TYPE_LAYER_NODE (clutter_layer_node_get_type ())
+#define CLUTTER_LAYER_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_LAYER_NODE,
ClutterLayerNode))
+#define CLUTTER_IS_LAYER_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_LAYER_NODE))
+
+/*
+ * ClutterLayerNode:
+ *
+ * The #ClutterLayerNode structure is an opaque
+ * type whose members cannot be directly accessed.
+ *
+ * Since: 1.10
+ */
+typedef struct _ClutterLayerNode ClutterLayerNode;
+typedef struct _ClutterLayerNodeClass ClutterLayerNodeClass;
+
+GType clutter_layer_node_get_type (void) G_GNUC_CONST;
+
+ClutterPaintNode * clutter_layer_node_new (const CoglMatrix *projection,
+ const cairo_rectangle_t *viewport,
+ float width,
+ float height,
+ guint8 opacity);
+
G_END_DECLS
#endif /* __CLUTTER_PAINT_NODES_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]