From 553372ffb72e629203bef5e99f6a00a5b15cfc6c Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sat, 14 Mar 2020 18:11:14 +0100 Subject: [PATCH] clutter: Drop CoglPaths handling from ClutterPaintNode This seems unused. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1126 --- clutter/clutter/clutter-paint-node-private.h | 3 -- clutter/clutter/clutter-paint-node.c | 48 -------------------- clutter/clutter/clutter-paint-node.h | 3 -- clutter/clutter/clutter-paint-nodes.c | 15 ------ 4 files changed, 69 deletions(-) diff --git a/clutter/clutter/clutter-paint-node-private.h b/clutter/clutter/clutter-paint-node-private.h index f912a6a10..faf5df23c 100644 --- a/clutter/clutter/clutter-paint-node-private.h +++ b/clutter/clutter/clutter-paint-node-private.h @@ -83,7 +83,6 @@ typedef enum PAINT_OP_INVALID = 0, PAINT_OP_TEX_RECT, PAINT_OP_MULTITEX_RECT, - PAINT_OP_PATH, PAINT_OP_PRIMITIVE } PaintOpCode; @@ -96,8 +95,6 @@ struct _ClutterPaintOperation union { float texrect[8]; - CoglPath *path; - CoglPrimitive *primitive; } op; }; diff --git a/clutter/clutter/clutter-paint-node.c b/clutter/clutter/clutter-paint-node.c index 138a64652..c91182bd0 100644 --- a/clutter/clutter/clutter-paint-node.c +++ b/clutter/clutter/clutter-paint-node.c @@ -782,11 +782,6 @@ clutter_paint_operation_clear (ClutterPaintOperation *op) g_array_unref (op->multitex_coords); break; - case PAINT_OP_PATH: - if (op->op.path != NULL) - cogl_object_unref (op->op.path); - break; - case PAINT_OP_PRIMITIVE: if (op->op.primitive != NULL) cogl_object_unref (op->op.primitive); @@ -836,16 +831,6 @@ clutter_paint_op_init_multitex_rect (ClutterPaintOperation *op, op->op.texrect[3] = rect->y2; } -static inline void -clutter_paint_op_init_path (ClutterPaintOperation *op, - CoglPath *path) -{ - clutter_paint_operation_clear (op); - - op->opcode = PAINT_OP_PATH; - op->op.path = cogl_object_ref (path); -} - static inline void clutter_paint_op_init_primitive (ClutterPaintOperation *op, CoglPrimitive *primitive) @@ -950,34 +935,6 @@ clutter_paint_node_add_multitexture_rectangle (ClutterPaintNode *node, g_array_append_val (node->operations, operation); } -/** - * clutter_paint_node_add_path: (skip) - * @node: a #ClutterPaintNode - * @path: a Cogl path - * - * Adds a region described as a path to the @node. - * - * This function acquires a reference on the passed @path, so it - * is safe to call cogl_object_unref() when it returns. - * - * Since: 1.10 - * Stability: unstable - */ -void -clutter_paint_node_add_path (ClutterPaintNode *node, - CoglPath *path) -{ - ClutterPaintOperation operation = PAINT_OP_INIT; - - g_return_if_fail (CLUTTER_IS_PAINT_NODE (node)); - g_return_if_fail (cogl_is_path (path)); - - clutter_paint_node_maybe_init_operations (node); - - clutter_paint_op_init_path (&operation, path); - g_array_append_val (node->operations, operation); -} - /** * clutter_paint_node_add_primitive: (skip) * @node: a #ClutterPaintNode @@ -1114,11 +1071,6 @@ clutter_paint_node_to_json (ClutterPaintNode *node) json_builder_end_array (builder); break; - case PAINT_OP_PATH: - json_builder_set_member_name (builder, "path"); - json_builder_add_int_value (builder, (intptr_t) op->op.path); - break; - case PAINT_OP_PRIMITIVE: json_builder_set_member_name (builder, "primitive"); json_builder_add_int_value (builder, (intptr_t) op->op.primitive); diff --git a/clutter/clutter/clutter-paint-node.h b/clutter/clutter/clutter-paint-node.h index 9623d8bca..7afc60f66 100644 --- a/clutter/clutter/clutter-paint-node.h +++ b/clutter/clutter/clutter-paint-node.h @@ -84,9 +84,6 @@ void clutter_paint_node_add_multitexture_rectangle (ClutterP unsigned int text_coords_len); CLUTTER_EXPORT -void clutter_paint_node_add_path (ClutterPaintNode *node, - CoglPath *path); -CLUTTER_EXPORT void clutter_paint_node_add_primitive (ClutterPaintNode *node, CoglPrimitive *primitive); diff --git a/clutter/clutter/clutter-paint-nodes.c b/clutter/clutter/clutter-paint-nodes.c index 72d21788c..d6827f66b 100644 --- a/clutter/clutter/clutter-paint-nodes.c +++ b/clutter/clutter/clutter-paint-nodes.c @@ -477,10 +477,6 @@ clutter_pipeline_node_draw (ClutterPaintNode *node, op->multitex_coords->len); break; - case PAINT_OP_PATH: - cogl_framebuffer_fill_path (fb, pnode->pipeline, op->op.path); - break; - case PAINT_OP_PRIMITIVE: cogl_framebuffer_draw_primitive (fb, pnode->pipeline, @@ -876,7 +872,6 @@ clutter_text_node_draw (ClutterPaintNode *node, break; case PAINT_OP_MULTITEX_RECT: - case PAINT_OP_PATH: case PAINT_OP_PRIMITIVE: case PAINT_OP_INVALID: break; @@ -1037,11 +1032,6 @@ clutter_clip_node_pre_draw (ClutterPaintNode *node, retval = TRUE; break; - case PAINT_OP_PATH: - cogl_framebuffer_push_path_clip (fb, op->op.path); - retval = TRUE; - break; - case PAINT_OP_MULTITEX_RECT: case PAINT_OP_PRIMITIVE: case PAINT_OP_INVALID: @@ -1072,7 +1062,6 @@ clutter_clip_node_post_draw (ClutterPaintNode *node, switch (op->opcode) { - case PAINT_OP_PATH: case PAINT_OP_TEX_RECT: cogl_framebuffer_pop_clip (fb); break; @@ -1355,10 +1344,6 @@ clutter_layer_node_post_draw (ClutterPaintNode *node, op->multitex_coords->len); break; - case PAINT_OP_PATH: - cogl_framebuffer_fill_path (fb, lnode->pipeline, op->op.path); - break; - case PAINT_OP_PRIMITIVE: cogl_framebuffer_draw_primitive (fb, lnode->pipeline,