1
0
Fork 0

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>
This commit is contained in:
Fernando Monteiro 2021-09-16 22:33:03 +01:00 committed by Marge Bot
parent b8925ef3d4
commit 913458381f
4 changed files with 9 additions and 42 deletions

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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,

View file

@ -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