From bf1997c4ef83c658c3566574e8bdf01dd9120957 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 20 Aug 2013 00:01:45 +0100 Subject: [PATCH] paint-nodes: Have a fallback buffer for the root node If we don't get passed a CoglFramebuffer when creating the root paint node then we ask Cogl to give us the current draw buffer. This allows the text-cache conformance test to pass, but it'll require further investigation. --- clutter/clutter-paint-nodes.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-paint-nodes.c b/clutter/clutter-paint-nodes.c index 91bc91bf9..2b95d413d 100644 --- a/clutter/clutter-paint-nodes.c +++ b/clutter/clutter-paint-nodes.c @@ -166,7 +166,11 @@ _clutter_root_node_new (CoglFramebuffer *framebuffer, clear_color->alpha); cogl_color_premultiply (&res->clear_color); - res->framebuffer = cogl_object_ref (framebuffer); + if (G_LIKELY (framebuffer != NULL)) + res->framebuffer = cogl_object_ref (framebuffer); + else + res->framebuffer = cogl_object_ref (cogl_get_draw_framebuffer ()); + res->clear_flags = clear_flags; return (ClutterPaintNode *) res;