mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 21:34:09 +00:00
examples: Do not use deprecated Cogl API
Examples should be as idiomatic as possible.
This commit is contained in:
parent
9ab320cd3d
commit
0294fc27ed
@ -121,12 +121,12 @@ paint (Data *data)
|
|||||||
|
|
||||||
/* And finally render our Pango layouts... */
|
/* And finally render our Pango layouts... */
|
||||||
|
|
||||||
cogl_pango_render_layout (data->hello_label,
|
cogl_pango_show_layout (fb, data->hello_label,
|
||||||
(data->framebuffer_width / 2) -
|
(data->framebuffer_width / 2) -
|
||||||
(data->hello_label_width / 2),
|
(data->hello_label_width / 2),
|
||||||
(data->framebuffer_height / 2) -
|
(data->framebuffer_height / 2) -
|
||||||
(data->hello_label_height / 2),
|
(data->hello_label_height / 2),
|
||||||
&white, 0);
|
&white);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -265,8 +265,6 @@ main (int argc, char **argv)
|
|||||||
data.hello_label_width = PANGO_PIXELS (hello_label_size.width);
|
data.hello_label_width = PANGO_PIXELS (hello_label_size.width);
|
||||||
data.hello_label_height = PANGO_PIXELS (hello_label_size.height);
|
data.hello_label_height = PANGO_PIXELS (hello_label_size.height);
|
||||||
|
|
||||||
cogl_push_framebuffer (fb);
|
|
||||||
|
|
||||||
data.swap_ready = TRUE;
|
data.swap_ready = TRUE;
|
||||||
|
|
||||||
cogl_onscreen_add_frame_callback (COGL_ONSCREEN (fb),
|
cogl_onscreen_add_frame_callback (COGL_ONSCREEN (fb),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user