gl renderer: Handle repeat nodes with invisible children
authorTimm Bäder <mail@baedert.org>
Tue, 7 Jan 2020 16:15:02 +0000 (17:15 +0100)
committerTimm Bäder <mail@baedert.org>
Tue, 7 Jan 2020 16:27:19 +0000 (17:27 +0100)
We can handle this pretty easily by normally drawing the other
(visible) child node, if any.

gsk/gl/gskglrenderer.c

index 157d827658180c31d94aeda4e3e52688c62e2849..fc136956546dc19bb01e8eff0ef80ffc6c8927a4 100644 (file)
@@ -2179,14 +2179,24 @@ render_blend_node (GskGLRenderer   *self,
                           bottom_child,
                           &bottom_region, &is_offscreen1,
                           FORCE_OFFSCREEN | RESET_CLIP))
-    g_assert_not_reached ();
+    {
+      gsk_gl_renderer_add_render_ops (self, top_child, builder);
+      return;
+    }
 
   if (!add_offscreen_ops (self, builder,
                           &node->bounds,
                           top_child,
                           &top_region, &is_offscreen2,
                           FORCE_OFFSCREEN | RESET_CLIP))
-    g_assert_not_reached ();
+    {
+      load_vertex_data_with_region (ops_draw (builder, NULL),
+                                    node,
+                                    builder,
+                                    &bottom_region,
+                                    TRUE);
+      return;
+    }
 
   ops_set_program (builder, &self->blend_program);
   ops_set_texture (builder, bottom_region.texture_id);