[mutter/gbsneto/offscreen-paint-node: 12/22] clutter/paint-nodes: Make ClutterLayerNode always push/pop
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/offscreen-paint-node: 12/22] clutter/paint-nodes: Make ClutterLayerNode always push/pop
- Date: Tue, 8 Dec 2020 20:52:11 +0000 (UTC)
commit 6ce2a2482c256b02dda00546732f18f946ec2161
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Dec 8 15:11:51 2020 -0300
clutter/paint-nodes: Make ClutterLayerNode always push/pop
ClutterLayerNode currently skips pushing the offscreen framebuffer when
no operations are set. This was added at the time because pushing and
popping was a synchronization point in Cogl, slow enough to force the
layer node to have this protective measure. Nowadays, pushing and
popping on the paint context is free.
Make ClutterLayerNode always push and pop in pre and post paint.
clutter/clutter/clutter-paint-nodes.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter/clutter-paint-nodes.c b/clutter/clutter/clutter-paint-nodes.c
index 1cdd09ff84..02878ae514 100644
--- a/clutter/clutter/clutter-paint-nodes.c
+++ b/clutter/clutter/clutter-paint-nodes.c
@@ -1363,10 +1363,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->needs_fbo_setup)
{
/* copy the same modelview from the current framebuffer to the one we
@@ -1414,6 +1410,9 @@ clutter_layer_node_post_draw (ClutterPaintNode *node,
cogl_framebuffer_pop_matrix (lnode->offscreen);
clutter_paint_context_pop_framebuffer (paint_context);
+ if (!node->operations)
+ 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]