Remove all internal use of deprecated cogl_clip_* API

cogl_clip_push, and cogl_clip_push_window_rect which are now deprecated were
used in various places internally so this just switches to using the
replacement functions.
This commit is contained in:
Robert Bragg 2009-11-05 16:50:24 +00:00
parent c1d9e09d38
commit abae6013e1
5 changed files with 19 additions and 17 deletions

View File

@ -2359,10 +2359,10 @@ clutter_actor_paint (ClutterActor *self)
if (priv->has_clip)
{
cogl_clip_push (priv->clip[0],
cogl_clip_push_rectangle (priv->clip[0],
priv->clip[1],
priv->clip[2],
priv->clip[3]);
priv->clip[0] + priv->clip[2],
priv->clip[1] + priv->clip[3]);
clip_set = TRUE;
}
else if (priv->clip_to_allocation)
@ -2372,7 +2372,7 @@ clutter_actor_paint (ClutterActor *self)
width = priv->allocation.x2 - priv->allocation.x1;
height = priv->allocation.y2 - priv->allocation.y1;
cogl_clip_push (0, 0, width, height);
cogl_clip_push_rectangle (0, 0, width, height);
clip_set = TRUE;
}

View File

@ -489,7 +489,7 @@ _clutter_do_pick (ClutterStage *stage,
_clutter_stage_maybe_setup_viewport (stage);
if (G_LIKELY (!(clutter_debug_flags & CLUTTER_DEBUG_DUMP_PICK_BUFFERS)))
cogl_clip_push_window_rect (x, y, 1, 1);
cogl_clip_push_window_rectangle (x, y, 1, 1);
cogl_color_set_from_4ub (&white, 255, 255, 255, 255);
cogl_disable_fog ();

View File

@ -1610,7 +1610,7 @@ clutter_text_paint (ClutterActor *self)
pango_layout_get_extents (layout, NULL, &logical_rect);
cogl_clip_push (0, 0,
cogl_clip_push_rectangle (0, 0,
(alloc.x2 - alloc.x1),
(alloc.y2 - alloc.y1));
clip_set = TRUE;

View File

@ -154,7 +154,7 @@ on_paint (ClutterActor *actor, void *state)
400); /* height */
/* clear everything... */
cogl_clear (&black, COGL_BUFFER_BIT_COLOR);
cogl_clip_push_window_rect (20, 10, 100, 200);
cogl_clip_push_window_rectangle (20, 10, 100, 200);
/* fill the viewport with blue.. */
cogl_set_source_color4ub (0x00, 0x00, 0xff, 0xff);
cogl_rectangle (-1, 1, 1, -1);
@ -191,7 +191,8 @@ on_paint (ClutterActor *actor, void *state)
/* XXX: Rotate just enough to stop Cogl from converting our model space
* rectangle into a window space rectangle.. */
cogl_rotate (0.1, 0, 0, 1);
cogl_clip_push (-(width/2.0), -(height/2.0), width, height);
cogl_clip_push_rectangle (-(width/2.0), -(height/2.0),
width/2.0, height/2.0);
cogl_pop_matrix ();
/* fill the viewport with green.. */
cogl_set_source_color4ub (0x00, 0xff, 0x00, 0xff);
@ -283,7 +284,7 @@ on_paint (ClutterActor *actor, void *state)
400); /* height */
/* clear everything... */
cogl_clear (&black, COGL_BUFFER_BIT_COLOR);
cogl_clip_push_window_rect (20, 10, 100, 200);
cogl_clip_push_window_rectangle (20, 10, 100, 200);
/* fill the viewport with blue.. */
cogl_set_source_color4ub (0x00, 0x00, 0xff, 0xff);
cogl_rectangle (-1, 1, 1, -1);
@ -320,7 +321,8 @@ on_paint (ClutterActor *actor, void *state)
/* XXX: Rotate just enough to stop Cogl from converting our model space
* rectangle into a window space rectangle.. */
cogl_rotate (0.1, 0, 0, 1);
cogl_clip_push (-(width/2.0), -(height/2.0), width, height);
cogl_clip_push_rectangle (-(width/2.0), -(height/2.0),
width/2, height/2);
cogl_pop_matrix ();
/* fill the viewport with green.. */
cogl_set_source_color4ub (0x00, 0xff, 0x00, 0xff);

View File

@ -134,10 +134,10 @@ on_paint (ClutterActor *actor, CallbackData *data)
Clip *clip = (Clip *) node->data;
if (clip->type == CLIP_RECTANGLE)
cogl_clip_push (clip->x1,
cogl_clip_push_rectangle (clip->x1,
clip->y1,
clip->x2 - clip->x1,
clip->y2 - clip->y1);
clip->x2,
clip->y2);
else
{
make_clip_path (clip);