Browse Source

Subtrees get dirtied when their clipnodes do

master
Patrick Jakobsen 2 years ago
parent
commit
dc39f583f4
  1. 9
      gui/gui.c

9
gui/gui.c

@ -925,9 +925,14 @@ void gui_generate_draw_commands(
assert(out_num_draw_commands != NULL); assert(out_num_draw_commands != NULL);
*out_num_draw_commands = 0; *out_num_draw_commands = 0;
memory_arena_reset(draw_command_arena); memory_arena_reset(draw_command_arena);
bool dirtyness = root->dirty;
GUI_Node_Reference clipnode = subtree->clipnode;
if(rdic_node_reference_valid(clipnode.rdic_ref)) {
dirtyness |= clipnode.node->dirty;
}
gui_generate_draw_commands_inner( gui_generate_draw_commands_inner(
x_offset, y_offset, x_offset, y_offset,
root, root->dirty, root, dirtyness,
draw_command_arena, out_num_draw_commands); draw_command_arena, out_num_draw_commands);
} }
@ -3388,7 +3393,7 @@ void gui_draw_rect_clipped(
} }
} }
} }
//CURSOR
void gui_layout_and_draw_subtree( void gui_layout_and_draw_subtree(
GUI_Context *context, GUI_Context *context,
GUI_Subtree *subtree, GUI_Subtree *subtree,

Loading…
Cancel
Save