[mutter] cogl: Remove usages of framebuffer_draw_primitive



commit 913458381f520451a373d6b4a05ca3b48f4439cc
Author: Fernando Monteiro <fr02monteiro gmail com>
Date:   Thu Sep 16 22:33:03 2021 +0100

    cogl: Remove usages of framebuffer_draw_primitive
    
    We were already returning cogl_primitive_draw in framebuffer_draw_primitive,
    so replace all usages and remove it.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2058>

 clutter/clutter/clutter-paint-nodes.c     | 12 ++++++------
 cogl/cogl-pango/cogl-pango-display-list.c |  5 +++--
 cogl/cogl/cogl-framebuffer.c              |  8 --------
 cogl/cogl/cogl-framebuffer.h              | 26 --------------------------
 4 files changed, 9 insertions(+), 42 deletions(-)
---
diff --git a/clutter/clutter/clutter-paint-nodes.c b/clutter/clutter/clutter-paint-nodes.c
index 2b5ed9971c..abf06450d6 100644
--- a/clutter/clutter/clutter-paint-nodes.c
+++ b/clutter/clutter/clutter-paint-nodes.c
@@ -484,9 +484,9 @@ clutter_pipeline_node_draw (ClutterPaintNode    *node,
           break;
 
         case PAINT_OP_PRIMITIVE:
-          cogl_framebuffer_draw_primitive (fb,
-                                           pnode->pipeline,
-                                           op->op.primitive);
+          cogl_primitive_draw (op->op.primitive,
+                               fb,
+                               pnode->pipeline);
           break;
         }
     }
@@ -1467,9 +1467,9 @@ clutter_layer_node_post_draw (ClutterPaintNode    *node,
           break;
 
         case PAINT_OP_PRIMITIVE:
-          cogl_framebuffer_draw_primitive (fb,
-                                           lnode->pipeline,
-                                           op->op.primitive);
+          cogl_primitive_draw (op->op.primitive,
+                               fb,
+                               lnode->pipeline);
           break;
         }
     }
diff --git a/cogl/cogl-pango/cogl-pango-display-list.c b/cogl/cogl-pango/cogl-pango-display-list.c
index 44db4c4724..3f7dcf944c 100644
--- a/cogl/cogl-pango/cogl-pango-display-list.c
+++ b/cogl/cogl-pango/cogl-pango-display-list.c
@@ -446,8 +446,9 @@ _cogl_pango_display_list_render (CoglFramebuffer *fb,
           break;
 
         case COGL_PANGO_DISPLAY_LIST_TRAPEZOID:
-          cogl_framebuffer_draw_primitive (fb, node->pipeline,
-                                           node->d.trapezoid.primitive);
+          cogl_primitive_draw (node->d.trapezoid.primitive, 
+                               fb,
+                               node->pipeline);
           break;
         }
     }
diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c
index 525b24293f..6f24b2e427 100644
--- a/cogl/cogl/cogl-framebuffer.c
+++ b/cogl/cogl/cogl-framebuffer.c
@@ -2497,14 +2497,6 @@ _cogl_framebuffer_draw_indexed_attributes (CoglFramebuffer *framebuffer,
     }
 }
 
-void
-cogl_framebuffer_draw_primitive (CoglFramebuffer *framebuffer,
-                                 CoglPipeline *pipeline,
-                                 CoglPrimitive *primitive)
-{
-  _cogl_primitive_draw (primitive, framebuffer, pipeline, 0);
-}
-
 void
 cogl_framebuffer_draw_rectangle (CoglFramebuffer *framebuffer,
                                  CoglPipeline *pipeline,
diff --git a/cogl/cogl/cogl-framebuffer.h b/cogl/cogl/cogl-framebuffer.h
index e0848e45c8..8e5aeb2e7e 100644
--- a/cogl/cogl/cogl-framebuffer.h
+++ b/cogl/cogl/cogl-framebuffer.h
@@ -1046,32 +1046,6 @@ cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer,
                           float blue,
                           float alpha);
 
-/**
- * cogl_framebuffer_draw_primitive: (skip)
- * @framebuffer: A destination #CoglFramebuffer
- * @pipeline: A #CoglPipeline state object
- * @primitive: A #CoglPrimitive geometry object
- *
- * Draws the given @primitive geometry to the specified destination
- * @framebuffer using the graphics processing state described by @pipeline.
- *
- * This drawing api doesn't support high-level meta texture types such
- * as #CoglTexture2DSliced so it is the user's responsibility to
- * ensure that only low-level textures that can be directly sampled by
- * a GPU such as #CoglTexture2D are associated with layers of the given
- * @pipeline.
- *
- * Stability: unstable
- * Since: 1.10
- * Deprecated: 1.16: Use #CoglPrimitive<!-- -->s and
- *                   cogl_primitive_draw() instead
- */
-COGL_DEPRECATED_FOR (cogl_primitive_draw)
-COGL_EXPORT void
-cogl_framebuffer_draw_primitive (CoglFramebuffer *framebuffer,
-                                 CoglPipeline *pipeline,
-                                 CoglPrimitive *primitive);
-
 /**
  * cogl_framebuffer_draw_rectangle:
  * @framebuffer: A destination #CoglFramebuffer


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