コード例 #1
0
        public MemoryMapDiffPane(UIState s, IViewPaneEventListener l, VisualElement toolbarExtension)
            : base(s, l)
        {
            CurrentTableView = (TableDisplayMode)UnityEditor.EditorPrefs.GetInt("Unity.MemoryProfilerForExtension.Editor.UI.MemoryMapPaneDiff.TableDisplayMode", (int)TableDisplayMode.Regions);

            m_ToolbarExtension     = toolbarExtension;
            m_ToolbarExtensionPane = new IMGUIContainer(new Action(OnGUIToolbarExtension));

            s.CurrentMode.ViewPaneChanged += OnViewPaneChanged;
            s.ModeChanged += OnModeChanged;

            string[] displayElements = Enum.GetNames(typeof(MemoryMap.MemoryMapDiff.DisplayElements));
            m_DisplayElementsList = new GUIContent[displayElements.Length];
            for (int i = 0; i < displayElements.Length; ++i)
            {
                m_DisplayElementsList[i] = new GUIContent(displayElements[i]);
            }

            string[] colorSchemes = Enum.GetNames(typeof(MemoryMap.MemoryMapDiff.ColorScheme));
            m_ColorSchemeList = new GUIContent[colorSchemes.Length];
            for (int i = 0; i < colorSchemes.Length; ++i)
            {
                m_ColorSchemeList[i] = new GUIContent(colorSchemes[i]);
            }

            ulong maxSize = 256 * 1024 * 1024; // 256,128,  64,32,16,8,  4,2,1,512,  256,128,64,32

            m_BytesInRowList = new RowSize[14];
            for (int i = 0; i < m_BytesInRowList.Length; ++i)
            {
                m_BytesInRowList[i] = new RowSize(maxSize >> i);
            }

            UIState.SnapshotMode mode1 = m_UIState.FirstMode as UIState.SnapshotMode;
            UIState.SnapshotMode mode2 = m_UIState.SecondMode as UIState.SnapshotMode;
            m_ActiveMode = mode1;

            m_MemoryMap = new MemoryMap.MemoryMapDiff();
            m_MemoryMap.Setup(mode1.snapshot, mode2.snapshot);
            m_MemoryMap.RegionSelected += OnSelectRegions;
        }
コード例 #2
0
 public ViewPane(UIState s, IViewPaneEventListener l)
 {
     m_UIState       = s;
     m_EventListener = l;
 }
コード例 #3
0
 public SpreadsheetPane(UIState s, IViewPaneEventListener l)
     : base(s, l)
 {
 }
コード例 #4
0
 public abstract ViewPane GetDefaultView(UIState uiState, IViewPaneEventListener viewPaneEventListener);