clutter/root-node: Require non-null framebuffer on construction
It's the only way it's used, and it removes a usage of deprecated Cogl implicit stack API. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
This commit is contained in:
parent
5145b33e01
commit
61026d181b
@ -165,6 +165,8 @@ clutter_root_node_new (CoglFramebuffer *framebuffer,
|
|||||||
{
|
{
|
||||||
ClutterRootNode *res;
|
ClutterRootNode *res;
|
||||||
|
|
||||||
|
g_return_val_if_fail (framebuffer, NULL);
|
||||||
|
|
||||||
res = _clutter_paint_node_create (CLUTTER_TYPE_ROOT_NODE);
|
res = _clutter_paint_node_create (CLUTTER_TYPE_ROOT_NODE);
|
||||||
|
|
||||||
cogl_color_init_from_4ub (&res->clear_color,
|
cogl_color_init_from_4ub (&res->clear_color,
|
||||||
@ -174,11 +176,7 @@ clutter_root_node_new (CoglFramebuffer *framebuffer,
|
|||||||
clear_color->alpha);
|
clear_color->alpha);
|
||||||
cogl_color_premultiply (&res->clear_color);
|
cogl_color_premultiply (&res->clear_color);
|
||||||
|
|
||||||
if (G_LIKELY (framebuffer != NULL))
|
res->framebuffer = cogl_object_ref (framebuffer);
|
||||||
res->framebuffer = cogl_object_ref (framebuffer);
|
|
||||||
else
|
|
||||||
res->framebuffer = cogl_object_ref (cogl_get_draw_framebuffer ());
|
|
||||||
|
|
||||||
res->clear_flags = clear_flags;
|
res->clear_flags = clear_flags;
|
||||||
|
|
||||||
return (ClutterPaintNode *) res;
|
return (ClutterPaintNode *) res;
|
||||||
|
Loading…
Reference in New Issue
Block a user