Ejemplo n.º 1
0
        private void Initialize()
        {
            int len = ProfilerDriver.maxHistoryLength - 1;

            this.m_Charts = new ProfilerChart[7];
            Color[] colors = ProfilerColors.colors;
            for (ProfilerArea profilerArea = ProfilerArea.CPU; profilerArea < ProfilerArea.AreaCount; profilerArea++)
            {
                float           dataScale = 1f;
                Chart.ChartType type      = Chart.ChartType.Line;
                string[]        graphStatisticsPropertiesForArea = ProfilerDriver.GetGraphStatisticsPropertiesForArea(profilerArea);
                int             num = graphStatisticsPropertiesForArea.Length;
                if (profilerArea == ProfilerArea.GPU || profilerArea == ProfilerArea.CPU)
                {
                    type      = Chart.ChartType.StackedFill;
                    dataScale = 0.001f;
                }
                ProfilerChart profilerChart = new ProfilerChart(profilerArea, type, dataScale, num);
                for (int i = 0; i < num; i++)
                {
                    profilerChart.m_Series[i] = new ChartSeries(graphStatisticsPropertiesForArea[i], len, colors[i]);
                }
                this.m_Charts[(int)profilerArea] = profilerChart;
            }
            if (this.m_ReferenceListView == null)
            {
                this.m_ReferenceListView = new MemoryTreeList(this, null);
            }
            if (this.m_MemoryListView == null)
            {
                this.m_MemoryListView = new MemoryTreeListClickable(this, this.m_ReferenceListView);
            }
            this.UpdateCharts();
            this.BuildColumns();
            ProfilerChart[] charts = this.m_Charts;
            for (int j = 0; j < charts.Length; j++)
            {
                ProfilerChart profilerChart2 = charts[j];
                profilerChart2.LoadAndBindSettings();
            }
        }
Ejemplo n.º 2
0
 private void Initialize()
 {
     int len = ProfilerDriver.maxHistoryLength - 1;
     this.m_Charts = new ProfilerChart[9];
     Color[] colors = ProfilerColors.colors;
     for (ProfilerArea area = ProfilerArea.CPU; area < ProfilerArea.AreaCount; area += 1)
     {
         float dataScale = 1f;
         Chart.ChartType line = Chart.ChartType.Line;
         string[] graphStatisticsPropertiesForArea = ProfilerDriver.GetGraphStatisticsPropertiesForArea(area);
         int length = graphStatisticsPropertiesForArea.Length;
         switch (area)
         {
             case ProfilerArea.GPU:
             case ProfilerArea.CPU:
                 line = Chart.ChartType.StackedFill;
                 dataScale = 0.001f;
                 break;
         }
         ProfilerChart chart = new ProfilerChart(area, line, dataScale, length);
         for (int i = 0; i < length; i++)
         {
             chart.m_Series[i] = new ChartSeries(graphStatisticsPropertiesForArea[i], len, colors[i]);
         }
         this.m_Charts[(int) area] = chart;
     }
     if (this.m_ReferenceListView == null)
     {
         this.m_ReferenceListView = new MemoryTreeList(this, null);
     }
     if (this.m_MemoryListView == null)
     {
         this.m_MemoryListView = new MemoryTreeListClickable(this, this.m_ReferenceListView);
     }
     this.UpdateCharts();
     this.BuildColumns();
     foreach (ProfilerChart chart2 in this.m_Charts)
     {
         chart2.LoadAndBindSettings();
     }
 }
Ejemplo n.º 3
0
 private void Initialize()
 {
   int len = ProfilerDriver.maxHistoryLength - 1;
   this.m_Charts = new ProfilerChart[9];
   Color[] colors = ProfilerColors.colors;
   for (ProfilerArea area = ProfilerArea.CPU; area < ProfilerArea.AreaCount; ++area)
   {
     float dataScale = 1f;
     Chart.ChartType type = Chart.ChartType.Line;
     string[] propertiesForArea = ProfilerDriver.GetGraphStatisticsPropertiesForArea(area);
     int length = propertiesForArea.Length;
     if (area == ProfilerArea.GPU || area == ProfilerArea.CPU)
     {
       type = Chart.ChartType.StackedFill;
       dataScale = 1f / 1000f;
     }
     ProfilerChart profilerChart = new ProfilerChart(area, type, dataScale, length);
     for (int index = 0; index < length; ++index)
       profilerChart.m_Series[index] = new ChartSeries(propertiesForArea[index], len, colors[index]);
     this.m_Charts[(int) area] = profilerChart;
   }
   if (this.m_ReferenceListView == null)
     this.m_ReferenceListView = new MemoryTreeList((EditorWindow) this, (MemoryTreeList) null);
   if (this.m_MemoryListView == null)
     this.m_MemoryListView = new MemoryTreeListClickable((EditorWindow) this, this.m_ReferenceListView);
   this.UpdateCharts();
   this.BuildColumns();
   foreach (ProfilerChart chart in this.m_Charts)
     chart.LoadAndBindSettings();
 }
Ejemplo n.º 4
0
		private void Initialize()
		{
			int len = ProfilerDriver.maxHistoryLength - 1;
			this.m_Charts = new ProfilerChart[7];
			Color[] colors = ProfilerColors.colors;
			for (ProfilerArea profilerArea = ProfilerArea.CPU; profilerArea < ProfilerArea.AreaCount; profilerArea++)
			{
				float dataScale = 1f;
				Chart.ChartType type = Chart.ChartType.Line;
				string[] graphStatisticsPropertiesForArea = ProfilerDriver.GetGraphStatisticsPropertiesForArea(profilerArea);
				int num = graphStatisticsPropertiesForArea.Length;
				if (profilerArea == ProfilerArea.GPU || profilerArea == ProfilerArea.CPU)
				{
					type = Chart.ChartType.StackedFill;
					dataScale = 0.001f;
				}
				ProfilerChart profilerChart = new ProfilerChart(profilerArea, type, dataScale, num);
				for (int i = 0; i < num; i++)
				{
					profilerChart.m_Series[i] = new ChartSeries(graphStatisticsPropertiesForArea[i], len, colors[i]);
				}
				this.m_Charts[(int)profilerArea] = profilerChart;
			}
			if (this.m_ReferenceListView == null)
			{
				this.m_ReferenceListView = new MemoryTreeList(this, null);
			}
			if (this.m_MemoryListView == null)
			{
				this.m_MemoryListView = new MemoryTreeListClickable(this, this.m_ReferenceListView);
			}
			this.UpdateCharts();
			this.BuildColumns();
			ProfilerChart[] charts = this.m_Charts;
			for (int j = 0; j < charts.Length; j++)
			{
				ProfilerChart profilerChart2 = charts[j];
				profilerChart2.LoadAndBindSettings();
			}
		}