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.
This commit is contained in:
Emmanuele Bassi 2013-08-20 00:01:45 +01:00
parent c14bd84eef
commit bf1997c4ef

View File

@ -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;