[mutter/gbsneto/effects-paint-nodes: 14/16] clutter/paint-nodes: Push and pop framebuffer even without ops
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/effects-paint-nodes: 14/16] clutter/paint-nodes: Push and pop framebuffer even without ops
- Date: Tue, 30 Jun 2020 16:53:27 +0000 (UTC)
commit e1afe2b6747af17187793df9ed8e4a3aa616bb90
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Jun 29 15:23:10 2020 -0300
clutter/paint-nodes: Push and pop framebuffer even without ops
ClutterLayerNode currently skips pushing and popping its framebuffer
to the paint context when no rectangles are added to it. However,
it's still useful to do that, since we might want to render child
nodes to the offscreen and reuse the pipeline in a later node.
Make ClutterLayerNode push and pop its framebuffer even without
rectangles.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1340
clutter/clutter/clutter-paint-nodes.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter/clutter-paint-nodes.c b/clutter/clutter/clutter-paint-nodes.c
index c87488b72b..3227258f64 100644
--- a/clutter/clutter/clutter-paint-nodes.c
+++ b/clutter/clutter/clutter-paint-nodes.c
@@ -1257,10 +1257,6 @@ clutter_layer_node_pre_draw (ClutterPaintNode *node,
if (lnode->offscreen == NULL)
return FALSE;
- /* if no geometry was submitted for this node then we simply ignore it */
- if (node->operations == NULL)
- return FALSE;
-
if (lnode->update_modelview)
{
CoglFramebuffer *framebuffer;
@@ -1311,6 +1307,10 @@ clutter_layer_node_post_draw (ClutterPaintNode *node,
cogl_framebuffer_pop_matrix (lnode->offscreen);
clutter_paint_context_pop_framebuffer (paint_context);
+ /* if no geometry was submitted for this node then we simply ignore it */
+ if (node->operations == NULL)
+ return;
+
fb = clutter_paint_context_get_framebuffer (paint_context);
for (i = 0; i < node->operations->len; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]