From 656ccb4dee9d8236c4e91c1e2fc13b22f8793722 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 16 May 2023 18:53:56 -0300 Subject: cogl/framebuffer: Remove scissor clip It's unused. Spotted while discussing snapshot APIs. Part-of: --- cogl/cogl/cogl-framebuffer.c | 21 --------------------- cogl/cogl/cogl-framebuffer.h | 28 ++-------------------------- 2 files changed, 2 insertions(+), 47 deletions(-) diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c index c01ef8d8e..ecc624000 100644 --- a/cogl/cogl/cogl-framebuffer.c +++ b/cogl/cogl/cogl-framebuffer.c @@ -2009,27 +2009,6 @@ cogl_framebuffer_set_projection_matrix (CoglFramebuffer *framebuffer, } } -void -cogl_framebuffer_push_scissor_clip (CoglFramebuffer *framebuffer, - int x, - int y, - int width, - int height) -{ - CoglFramebufferPrivate *priv = - cogl_framebuffer_get_instance_private (framebuffer); - - priv->clip_stack = - _cogl_clip_stack_push_window_rectangle (priv->clip_stack, - x, y, width, height); - - if (priv->context->current_draw_buffer == framebuffer) - { - priv->context->current_draw_buffer_changes |= - COGL_FRAMEBUFFER_STATE_CLIP; - } -} - void cogl_framebuffer_push_rectangle_clip (CoglFramebuffer *framebuffer, float x_1, diff --git a/cogl/cogl/cogl-framebuffer.h b/cogl/cogl/cogl-framebuffer.h index e89b8f3a7..3c7f472df 100644 --- a/cogl/cogl/cogl-framebuffer.h +++ b/cogl/cogl/cogl-framebuffer.h @@ -470,30 +470,6 @@ COGL_EXPORT void cogl_framebuffer_set_projection_matrix (CoglFramebuffer *framebuffer, const graphene_matrix_t *matrix); -/** - * cogl_framebuffer_push_scissor_clip: - * @framebuffer: A #CoglFramebuffer pointer - * @x: left edge of the clip rectangle in window coordinates - * @y: top edge of the clip rectangle in window coordinates - * @width: width of the clip rectangle - * @height: height of the clip rectangle - * - * Specifies a rectangular clipping area for all subsequent drawing - * operations. Any drawing commands that extend outside the rectangle - * will be clipped so that only the portion inside the rectangle will - * be displayed. The rectangle dimensions are not transformed by the - * current model-view matrix. - * - * The rectangle is intersected with the current clip region. To undo - * the effect of this function, call cogl_framebuffer_pop_clip(). - */ -COGL_EXPORT void -cogl_framebuffer_push_scissor_clip (CoglFramebuffer *framebuffer, - int x, - int y, - int width, - int height); - /** * cogl_framebuffer_push_rectangle_clip: * @framebuffer: A #CoglFramebuffer pointer @@ -561,8 +537,8 @@ cogl_framebuffer_push_region_clip (CoglFramebuffer *framebuffer, * @framebuffer: A #CoglFramebuffer pointer * * Reverts the clipping region to the state before the last call to - * cogl_framebuffer_push_scissor_clip(), cogl_framebuffer_push_rectangle_clip() - * cogl_framebuffer_push_path_clip(), or cogl_framebuffer_push_primitive_clip(). + * cogl_framebuffer_push_rectangle_clip(), or + * cogl_framebuffer_push_primitive_clip(). */ COGL_EXPORT void cogl_framebuffer_pop_clip (CoglFramebuffer *framebuffer); -- cgit v1.2.1