Пример #1
0
        private void RefreshVisualTrees()
        {
            m_VisualTrees.Clear();

            List <GUIView> guiViews = new List <GUIView>();

            GUIViewDebuggerHelper.GetViews(guiViews);
            var it = UIElementsUtility.GetPanelsIterator();

            while (it.MoveNext())
            {
                HostView view = guiViews.FirstOrDefault(v => v.GetInstanceID() == it.Current.Key) as HostView;
                if (view == null)
                {
                    continue;
                }

                // Skip this window
                if (view.actualView == this)
                {
                    continue;
                }

                var panel     = it.Current.Value;
                var panelMode = UIRDebugUtility.GetPanelRepaintMode(panel);
                if (panelMode != RepaintMode.Standard)
                {
                    m_VisualTrees.Add(new VisualTreeDebug()
                    {
                        panel = panel
                    });
                }
            }
        }
        public override void Refresh()
        {
            var renderDevice = UIRDebugUtility.GetUIRenderDevice(m_SelectedVisualTree.panel);

            Debug.Assert(renderDevice != null, "Allocator debugger fail to retrieve UIRenderDevice");
            if (renderDevice != null)
            {
                RefreshStats(renderDevice);
            }
        }