public void UpdateStats(UIRenderDevice.AllocationStatistics stats) { m_GlobalContainer.Clear(); m_PermContainer.Clear(); m_TempContainer.Clear(); m_GlobalContainer.Add(new Label("Global")); m_PermContainer.Add(new Label("Perm")); m_TempContainer.Add(new Label("Temp")); foreach (var pageStats in stats.pages) { var globalStats = new VisualElement(); globalStats.AddToClassList("page-stats"); globalStats.Add(new Label("Vertices")); globalStats.Add(new HeapStats(pageStats.vertices)); globalStats.Add(new Label("Indices")); globalStats.Add(new HeapStats(pageStats.indices)); m_GlobalContainer.Add(globalStats); var permStats = new VisualElement(); permStats.AddToClassList("page-stats"); permStats.Add(new Label("Vertices")); permStats.Add(new HeapStats(pageStats.vertices.subAllocators[0])); permStats.Add(new Label("Indices")); permStats.Add(new HeapStats(pageStats.indices.subAllocators[0])); m_PermContainer.Add(permStats); var tempStats = new VisualElement(); tempStats.AddToClassList("page-stats"); tempStats.Add(new Label("Vertices")); tempStats.Add(new HeapStats(pageStats.vertices.subAllocators[1])); tempStats.Add(new Label("Indices")); tempStats.Add(new HeapStats(pageStats.indices.subAllocators[1])); m_TempContainer.Add(tempStats); } }
public void UpdateStats(UIRenderDevice.AllocationStatistics stats) { m_Stats = stats; }