Skip to content

Commit de16c9c

Browse files
committed
keep active tab view states hot, even if their ui is not built on any given frame (because they are not selected)
1 parent 90c86dc commit de16c9c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/raddbg/raddbg_core.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12098,6 +12098,33 @@ rd_frame(void)
1209812098
rd_state->entity2evalblob_map->slots_count = 256;
1209912099
rd_state->entity2evalblob_map->slots = push_array(rd_frame_arena(), RD_Entity2EvalBlobSlot, rd_state->entity2evalblob_map->slots_count);
1210012100

12101+
//////////////////////////////
12102+
//- rjf: iterate all tabs, touch their view-states
12103+
//
12104+
if(depth == 0)
12105+
{
12106+
Temp scratch = scratch_begin(0, 0);
12107+
RD_CfgList windows = rd_cfg_top_level_list_from_string(scratch.arena, str8_lit("window"));
12108+
for(RD_CfgNode *n = windows.first; n != 0; n = n->next)
12109+
{
12110+
RD_Cfg *window = n->v;
12111+
RD_PanelTree panel_tree = rd_panel_tree_from_cfg(scratch.arena, window);
12112+
for(RD_PanelNode *p = panel_tree.root; p != &rd_nil_panel_node; p = rd_panel_node_rec__depth_first_pre(panel_tree.root, p).next)
12113+
{
12114+
for(RD_CfgNode *n = p->tabs.first; n != 0; n = n->next)
12115+
{
12116+
RD_Cfg *tab = n->v;
12117+
if(rd_cfg_is_project_filtered(tab))
12118+
{
12119+
continue;
12120+
}
12121+
rd_view_state_from_cfg(tab);
12122+
}
12123+
}
12124+
}
12125+
scratch_end(scratch);
12126+
}
12127+
1210112128
//////////////////////////////
1210212129
//- rjf: garbage collect untouched immediate cfg trees
1210312130
//

0 commit comments

Comments
 (0)