[mutter/gbsneto/more-clutter-api: 25/25] clutter/paint-nodes: Push/pop framebuffer
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/more-clutter-api: 25/25] clutter/paint-nodes: Push/pop framebuffer
- Date: Fri, 1 Feb 2019 12:42:54 +0000 (UTC)
commit 317414ab26e0043d2d60d8cb924224168f3a2997
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jan 29 12:55:11 2019 -0200
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
clutter/clutter/clutter-paint-nodes.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/clutter/clutter/clutter-paint-nodes.c b/clutter/clutter/clutter-paint-nodes.c
index 74e544b51..d5efd5864 100644
--- a/clutter/clutter/clutter-paint-nodes.c
+++ b/clutter/clutter/clutter-paint-nodes.c
@@ -108,6 +108,8 @@ clutter_root_node_pre_draw (ClutterPaintNode *node)
{
ClutterRootNode *rnode = (ClutterRootNode *) node;
+ cogl_push_framebuffer (rnode->framebuffer);
+
cogl_framebuffer_clear (rnode->framebuffer,
rnode->clear_flags,
&rnode->clear_color);
@@ -118,6 +120,7 @@ clutter_root_node_pre_draw (ClutterPaintNode *node)
static void
clutter_root_node_post_draw (ClutterPaintNode *node)
{
+ cogl_pop_framebuffer ();
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]