[gnome-shell] st-box-layout: Fix Cogl deprecations
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st-box-layout: Fix Cogl deprecations
- Date: Sat, 21 Feb 2015 01:41:44 +0000 (UTC)
commit 8dab692f93522e3adbe3d03e59ddaca5c9a1e6ee
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Feb 20 17:02:56 2015 -0800
st-box-layout: Fix Cogl deprecations
src/st/st-box-layout.c | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
---
diff --git a/src/st/st-box-layout.c b/src/st/st-box-layout.c
index cb4917f..63e2ff7 100644
--- a/src/st/st-box-layout.c
+++ b/src/st/st-box-layout.c
@@ -387,19 +387,20 @@ st_box_layout_paint (ClutterActor *actor)
ClutterActorBox allocation_box;
ClutterActorBox content_box;
ClutterActor *child;
+ CoglFramebuffer *fb = cogl_get_draw_framebuffer ();
get_border_paint_offsets (self, &x, &y);
if (x != 0 || y != 0)
{
- cogl_push_matrix ();
- cogl_translate ((int)x, (int)y, 0);
+ cogl_framebuffer_push_matrix (fb);
+ cogl_framebuffer_translate (fb, (int)x, (int)y, 0);
}
st_widget_paint_background (ST_WIDGET (actor));
if (x != 0 || y != 0)
{
- cogl_pop_matrix ();
+ cogl_framebuffer_pop_matrix (fb);
}
if (clutter_actor_get_n_children (actor) == 0)
@@ -417,10 +418,11 @@ st_box_layout_paint (ClutterActor *actor)
* the borders and background stay in place; after drawing the borders and
* background, we clip to the content area */
if (priv->hadjustment || priv->vadjustment)
- cogl_clip_push_rectangle ((int)content_box.x1,
- (int)content_box.y1,
- (int)content_box.x2,
- (int)content_box.y2);
+ cogl_framebuffer_push_rectangle_clip (fb,
+ (int)content_box.x1,
+ (int)content_box.y1,
+ (int)content_box.x2,
+ (int)content_box.y2);
for (child = clutter_actor_get_first_child (actor);
child != NULL;
@@ -428,7 +430,7 @@ st_box_layout_paint (ClutterActor *actor)
clutter_actor_paint (child);
if (priv->hadjustment || priv->vadjustment)
- cogl_clip_pop ();
+ cogl_framebuffer_pop_clip (fb);
}
static void
@@ -442,19 +444,20 @@ st_box_layout_pick (ClutterActor *actor,
ClutterActorBox allocation_box;
ClutterActorBox content_box;
ClutterActor *child;
+ CoglFramebuffer *fb = cogl_get_draw_framebuffer ();
get_border_paint_offsets (self, &x, &y);
if (x != 0 || y != 0)
{
- cogl_push_matrix ();
- cogl_translate ((int)x, (int)y, 0);
+ cogl_framebuffer_push_matrix (fb);
+ cogl_framebuffer_translate (fb, (int)x, (int)y, 0);
}
CLUTTER_ACTOR_CLASS (st_box_layout_parent_class)->pick (actor, color);
if (x != 0 || y != 0)
{
- cogl_pop_matrix ();
+ cogl_framebuffer_pop_matrix (fb);
}
if (clutter_actor_get_n_children (actor) == 0)
@@ -469,10 +472,11 @@ st_box_layout_pick (ClutterActor *actor,
content_box.y2 += y;
if (priv->hadjustment || priv->vadjustment)
- cogl_clip_push_rectangle ((int)content_box.x1,
- (int)content_box.y1,
- (int)content_box.x2,
- (int)content_box.y2);
+ cogl_framebuffer_push_rectangle_clip (fb,
+ (int)content_box.x1,
+ (int)content_box.y1,
+ (int)content_box.x2,
+ (int)content_box.y2);
for (child = clutter_actor_get_first_child (actor);
child != NULL;
@@ -480,7 +484,7 @@ st_box_layout_pick (ClutterActor *actor,
clutter_actor_paint (child);
if (priv->hadjustment || priv->vadjustment)
- cogl_clip_pop ();
+ cogl_framebuffer_pop_clip (fb);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]