diff --git a/cogl/cogl/cogl-clip-stack.c b/cogl/cogl/cogl-clip-stack.c index 4212810aef7f34b6ed2470dbc5192e64bd32108c..74f031beaa3527086eb6e5d7fce8a53e469d0a37 100644 --- a/cogl/cogl/cogl-clip-stack.c +++ b/cogl/cogl/cogl-clip-stack.c @@ -127,27 +127,6 @@ _cogl_clip_stack_entry_set_bounds (CoglClipStack *entry, entry->bounds_y1 = ceilf (max_y); } -CoglClipStack * -_cogl_clip_stack_push_window_rectangle (CoglClipStack *stack, - int x_offset, - int y_offset, - int width, - int height) -{ - CoglClipStack *entry; - - entry = _cogl_clip_stack_push_entry (stack, - sizeof (CoglClipStackWindowRect), - COGL_CLIP_STACK_WINDOW_RECT); - - entry->bounds_x0 = x_offset; - entry->bounds_x1 = x_offset + width; - entry->bounds_y0 = y_offset; - entry->bounds_y1 = y_offset + height; - - return entry; -} - CoglClipStack * _cogl_clip_stack_push_rectangle (CoglClipStack *stack, float x_1, @@ -344,9 +323,6 @@ _cogl_clip_stack_unref (CoglClipStack *entry) g_free (entry); break; } - case COGL_CLIP_STACK_WINDOW_RECT: - g_free (entry); - break; case COGL_CLIP_STACK_PRIMITIVE: { CoglClipStackPrimitive *primitive_entry = diff --git a/cogl/cogl/cogl-clip-stack.h b/cogl/cogl/cogl-clip-stack.h index 2efaa2777457d3767d4a23c5e0f70bdb23421f03..3df72b36edd5ac95b9e8e4bea27c513e3b097f1f 100644 --- a/cogl/cogl/cogl-clip-stack.h +++ b/cogl/cogl/cogl-clip-stack.h @@ -52,7 +52,6 @@ typedef struct _CoglClipStackRegion CoglClipStackRegion; typedef enum { COGL_CLIP_STACK_RECT, - COGL_CLIP_STACK_WINDOW_RECT, COGL_CLIP_STACK_PRIMITIVE, COGL_CLIP_STACK_REGION, } CoglClipStackType; @@ -140,14 +139,6 @@ struct _CoglClipStackRect gboolean can_be_scissor; }; -struct _CoglClipStackWindowRect -{ - CoglClipStack _parent_data; - - /* The window rect clip doesn't need any specific data because it - just adds to the scissor clip */ -}; - struct _CoglClipStackPrimitive { CoglClipStack _parent_data; @@ -170,13 +161,6 @@ struct _CoglClipStackRegion cairo_region_t *region; }; -CoglClipStack * -_cogl_clip_stack_push_window_rectangle (CoglClipStack *stack, - int x_offset, - int y_offset, - int width, - int height); - COGL_EXPORT CoglClipStack * _cogl_clip_stack_push_rectangle (CoglClipStack *stack, float x_1, diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c index c01ef8d8e11f7dcb507c37280b5c8270916c0e6e..ecc624000028ca510bcb02cfa2352dfb1cefa64a 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 e89b8f3a7f4784b8e0d70366e5455d907e6cd659..3c7f472df637cc73c4c824d594b2cbcf2e834508 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); diff --git a/cogl/cogl/cogl-journal.c b/cogl/cogl/cogl-journal.c index 4ed508a7f64e535daa8eb092c6df9aea671b5f15..becdc0f7fdb30ebfcd42f396eceaf9c1bbeb3b36 100644 --- a/cogl/cogl/cogl-journal.c +++ b/cogl/cogl/cogl-journal.c @@ -1733,7 +1733,6 @@ try_checking_point_hits_entry_after_clipping (CoglFramebuffer *framebuffer, float y, gboolean *hit) { - gboolean can_software_clip = TRUE; gboolean needs_software_clip = FALSE; CoglClipStack *clip_entry; @@ -1754,15 +1753,7 @@ try_checking_point_hits_entry_after_clipping (CoglFramebuffer *framebuffer, return TRUE; } - if (clip_entry->type == COGL_CLIP_STACK_WINDOW_RECT) - { - /* XXX: technically we could still run the software clip in - * this case because for our purposes we know this clip - * can be ignored now, but [can_]sofware_clip_entry() doesn't - * know this and will bail out. */ - can_software_clip = FALSE; - } - else if (clip_entry->type == COGL_CLIP_STACK_RECT) + if (clip_entry->type == COGL_CLIP_STACK_RECT) { CoglClipStackRect *rect_entry = (CoglClipStackRect *)entry; @@ -1781,9 +1772,6 @@ try_checking_point_hits_entry_after_clipping (CoglFramebuffer *framebuffer, ClipBounds clip_bounds; float poly[16]; - if (!can_software_clip) - return FALSE; - if (!can_software_clip_entry (entry, NULL, entry->clip_stack, &clip_bounds)) return FALSE; diff --git a/cogl/cogl/driver/gl/cogl-clip-stack-gl.c b/cogl/cogl/driver/gl/cogl-clip-stack-gl.c index a693903b3ce5f381385d77c8f32c98dbf5e5bae2..366cab3a18e26d6b22153fb45b11e45f6e27520a 100644 --- a/cogl/cogl/driver/gl/cogl-clip-stack-gl.c +++ b/cogl/cogl/driver/gl/cogl-clip-stack-gl.c @@ -536,11 +536,6 @@ _cogl_clip_stack_gl_flush (CoglClipStack *stack, } break; } - case COGL_CLIP_STACK_WINDOW_RECT: - break; - /* We don't need to do anything for window space rectangles because - * their functionality is entirely implemented by the entry bounding - * box */ } } }