[mutter] clutter/root-node: Require non-null framebuffer on construction
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/root-node: Require non-null framebuffer on construction
- Date: Tue, 3 Dec 2019 19:14:23 +0000 (UTC)
commit 61026d181b693d4ae3fcbb2f7dea343452402877
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Nov 22 10:12:58 2019 +0100
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
clutter/clutter/clutter-paint-nodes.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/clutter/clutter/clutter-paint-nodes.c b/clutter/clutter/clutter-paint-nodes.c
index a0692e6b6..51ebf0739 100644
--- a/clutter/clutter/clutter-paint-nodes.c
+++ b/clutter/clutter/clutter-paint-nodes.c
@@ -165,6 +165,8 @@ clutter_root_node_new (CoglFramebuffer *framebuffer,
{
ClutterRootNode *res;
+ g_return_val_if_fail (framebuffer, NULL);
+
res = _clutter_paint_node_create (CLUTTER_TYPE_ROOT_NODE);
cogl_color_init_from_4ub (&res->clear_color,
@@ -174,11 +176,7 @@ clutter_root_node_new (CoglFramebuffer *framebuffer,
clear_color->alpha);
cogl_color_premultiply (&res->clear_color);
- if (G_LIKELY (framebuffer != NULL))
- res->framebuffer = cogl_object_ref (framebuffer);
- else
- res->framebuffer = cogl_object_ref (cogl_get_draw_framebuffer ());
-
+ res->framebuffer = cogl_object_ref (framebuffer);
res->clear_flags = clear_flags;
return (ClutterPaintNode *) res;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]