mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Tables: Garbage collection to relieve draw splitter buffers + for test engine: compact settings, remove table.
This commit is contained in:
parent
f80097ca96
commit
e5a5256971
3 changed files with 80 additions and 4 deletions
|
|
@ -2952,6 +2952,7 @@ void ImGui::GcCompactTransientMiscBuffers()
|
|||
ImGuiContext& g = *GImGui;
|
||||
g.ItemFlagsStack.clear();
|
||||
g.GroupStack.clear();
|
||||
TableGcCompactSettings();
|
||||
}
|
||||
|
||||
// Free up/compact internal window buffers, we can use this when a window becomes unused.
|
||||
|
|
@ -3906,6 +3907,11 @@ void ImGui::NewFrame()
|
|||
if (!window->WasActive && !window->MemoryCompacted && window->LastTimeActive < memory_compact_start_time)
|
||||
GcCompactTransientWindowBuffers(window);
|
||||
}
|
||||
|
||||
// Garbage collect transient buffers of recently unused tables
|
||||
for (int i = 0; i < g.TablesLastTimeActive.Size; i++)
|
||||
if (g.TablesLastTimeActive[i] >= 0.0f && g.TablesLastTimeActive[i] < memory_compact_start_time)
|
||||
TableGcCompactTransientBuffers(g.Tables.GetByIndex(i));
|
||||
if (g.GcCompactAll)
|
||||
GcCompactTransientMiscBuffers();
|
||||
g.GcCompactAll = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue