mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
clutter/paint-nodes: Push/pop framebuffer
Unfortunately, many parts of GNOME Shell and Mutter and Clutter still use the implicit Cogl1 API. As such, it as a transition between the old and new APIs, it is important to keep the implicit draw framebuffer updated. ClutterRootNode does not keep it updated though, and it might lead to problems when rendering offscreen textures. Fix that by pushing and popping the root node framebuffer on pre- and post-draw, respectively. https://gitlab.gnome.org/GNOME/mutter/merge_requests/405
This commit is contained in:
parent
b63e104561
commit
317414ab26
@ -108,6 +108,8 @@ clutter_root_node_pre_draw (ClutterPaintNode *node)
|
|||||||
{
|
{
|
||||||
ClutterRootNode *rnode = (ClutterRootNode *) node;
|
ClutterRootNode *rnode = (ClutterRootNode *) node;
|
||||||
|
|
||||||
|
cogl_push_framebuffer (rnode->framebuffer);
|
||||||
|
|
||||||
cogl_framebuffer_clear (rnode->framebuffer,
|
cogl_framebuffer_clear (rnode->framebuffer,
|
||||||
rnode->clear_flags,
|
rnode->clear_flags,
|
||||||
&rnode->clear_color);
|
&rnode->clear_color);
|
||||||
@ -118,6 +120,7 @@ clutter_root_node_pre_draw (ClutterPaintNode *node)
|
|||||||
static void
|
static void
|
||||||
clutter_root_node_post_draw (ClutterPaintNode *node)
|
clutter_root_node_post_draw (ClutterPaintNode *node)
|
||||||
{
|
{
|
||||||
|
cogl_pop_framebuffer ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user