private void CalculateBars(Rect r, int frameIndex, float time)
 {
   ProfilerFrameDataIterator frameDataIterator = new ProfilerFrameDataIterator();
   int groupCount = frameDataIterator.GetGroupCount(frameIndex);
   float num1 = 0.0f;
   frameDataIterator.SetRoot(frameIndex, 0);
   int threadCount = frameDataIterator.GetThreadCount(frameIndex);
   // ISSUE: object of a compiler-generated type is created
   // ISSUE: variable of a compiler-generated type
   ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAD barsCAnonStoreyAd = new ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAD();
   // ISSUE: reference to a compiler-generated field
   // ISSUE: reference to a compiler-generated field
   // ISSUE: reference to a compiler-generated field
   // ISSUE: reference to a compiler-generated field
   for (barsCAnonStoreyAd.i = 0; barsCAnonStoreyAd.i < threadCount; barsCAnonStoreyAd.i = barsCAnonStoreyAd.i + 1)
   {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAC barsCAnonStoreyAc = new ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAC();
     // ISSUE: reference to a compiler-generated field
     barsCAnonStoreyAc.\u003C\u003Ef__ref\u0024173 = barsCAnonStoreyAd;
     // ISSUE: reference to a compiler-generated field
     frameDataIterator.SetRoot(frameIndex, barsCAnonStoreyAd.i);
     // ISSUE: reference to a compiler-generated field
     barsCAnonStoreyAc.groupname = frameDataIterator.GetGroupName();
     // ISSUE: reference to a compiler-generated method
     ProfilerTimelineGUI.GroupInfo groupInfo = this.groups.Find(new Predicate<ProfilerTimelineGUI.GroupInfo>(barsCAnonStoreyAc.\u003C\u003Em__1F5));
     if (groupInfo == null)
     {
       groupInfo = new ProfilerTimelineGUI.GroupInfo();
       // ISSUE: reference to a compiler-generated field
       groupInfo.name = barsCAnonStoreyAc.groupname;
       groupInfo.height = 20f;
       groupInfo.expanded = false;
       groupInfo.threads = new List<ProfilerTimelineGUI.ThreadInfo>();
       this.groups.Add(groupInfo);
       // ISSUE: reference to a compiler-generated field
       // ISSUE: reference to a compiler-generated field
       if (barsCAnonStoreyAc.groupname == string.Empty || barsCAnonStoreyAc.groupname == "Unity Job System")
         groupInfo.expanded = true;
     }
     // ISSUE: reference to a compiler-generated method
     ProfilerTimelineGUI.ThreadInfo threadInfo1 = groupInfo.threads.Find(new Predicate<ProfilerTimelineGUI.ThreadInfo>(barsCAnonStoreyAc.\u003C\u003Em__1F6));
     if (threadInfo1 == null)
     {
       threadInfo1 = new ProfilerTimelineGUI.ThreadInfo();
       threadInfo1.name = frameDataIterator.GetThreadName();
       threadInfo1.height = 0.0f;
       ProfilerTimelineGUI.ThreadInfo threadInfo2 = threadInfo1;
       ProfilerTimelineGUI.ThreadInfo threadInfo3 = threadInfo1;
       int num2 = !groupInfo.expanded ? 0 : 1;
       double num3;
       float num4 = (float) (num3 = (double) num2);
       threadInfo3.desiredWeight = (float) num3;
       double num5 = (double) num4;
       threadInfo2.weight = (float) num5;
       // ISSUE: reference to a compiler-generated field
       threadInfo1.threadIndex = barsCAnonStoreyAd.i;
       groupInfo.threads.Add(threadInfo1);
     }
     if ((double) threadInfo1.weight != (double) threadInfo1.desiredWeight)
       threadInfo1.weight = (float) ((double) threadInfo1.desiredWeight * (double) time + (1.0 - (double) threadInfo1.desiredWeight) * (1.0 - (double) time));
     num1 += threadInfo1.weight;
   }
   float num6 = 16f * (float) groupCount;
   float num7 = (r.height - num6) / (num1 + 2f);
   using (List<ProfilerTimelineGUI.GroupInfo>.Enumerator enumerator1 = this.groups.GetEnumerator())
   {
     while (enumerator1.MoveNext())
     {
       using (List<ProfilerTimelineGUI.ThreadInfo>.Enumerator enumerator2 = enumerator1.Current.threads.GetEnumerator())
       {
         while (enumerator2.MoveNext())
         {
           ProfilerTimelineGUI.ThreadInfo current = enumerator2.Current;
           current.height = num7 * current.weight;
         }
       }
     }
   }
   this.groups[0].expanded = true;
   this.groups[0].height = 0.0f;
   this.groups[0].threads[0].height = 3f * num7;
 }
Ejemplo n.º 2
0
        private void CalculateBars(Rect r, int frameIndex, float time)
        {
            ProfilerFrameDataIterator frameDataIterator = new ProfilerFrameDataIterator();
            int   groupCount = frameDataIterator.GetGroupCount(frameIndex);
            float num1       = 0.0f;

            frameDataIterator.SetRoot(frameIndex, 0);
            int threadCount = frameDataIterator.GetThreadCount(frameIndex);

            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAD barsCAnonStoreyAd = new ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAD();
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            for (barsCAnonStoreyAd.i = 0; barsCAnonStoreyAd.i < threadCount; barsCAnonStoreyAd.i = barsCAnonStoreyAd.i + 1)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAC barsCAnonStoreyAc = new ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAC();
                // ISSUE: reference to a compiler-generated field
                barsCAnonStoreyAc.\u003C\u003Ef__ref\u0024173 = barsCAnonStoreyAd;
                // ISSUE: reference to a compiler-generated field
                frameDataIterator.SetRoot(frameIndex, barsCAnonStoreyAd.i);
                // ISSUE: reference to a compiler-generated field
                barsCAnonStoreyAc.groupname = frameDataIterator.GetGroupName();
                // ISSUE: reference to a compiler-generated method
                ProfilerTimelineGUI.GroupInfo groupInfo = this.groups.Find(new Predicate <ProfilerTimelineGUI.GroupInfo>(barsCAnonStoreyAc.\u003C\u003Em__1F5));
                if (groupInfo == null)
                {
                    groupInfo = new ProfilerTimelineGUI.GroupInfo();
                    // ISSUE: reference to a compiler-generated field
                    groupInfo.name     = barsCAnonStoreyAc.groupname;
                    groupInfo.height   = 20f;
                    groupInfo.expanded = false;
                    groupInfo.threads  = new List <ProfilerTimelineGUI.ThreadInfo>();
                    this.groups.Add(groupInfo);
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    if (barsCAnonStoreyAc.groupname == string.Empty || barsCAnonStoreyAc.groupname == "Unity Job System")
                    {
                        groupInfo.expanded = true;
                    }
                }
                // ISSUE: reference to a compiler-generated method
                ProfilerTimelineGUI.ThreadInfo threadInfo1 = groupInfo.threads.Find(new Predicate <ProfilerTimelineGUI.ThreadInfo>(barsCAnonStoreyAc.\u003C\u003Em__1F6));
                if (threadInfo1 == null)
                {
                    threadInfo1        = new ProfilerTimelineGUI.ThreadInfo();
                    threadInfo1.name   = frameDataIterator.GetThreadName();
                    threadInfo1.height = 0.0f;
                    ProfilerTimelineGUI.ThreadInfo threadInfo2 = threadInfo1;
                    ProfilerTimelineGUI.ThreadInfo threadInfo3 = threadInfo1;
                    int    num2 = !groupInfo.expanded ? 0 : 1;
                    double num3;
                    float  num4 = (float)(num3 = (double)num2);
                    threadInfo3.desiredWeight = (float)num3;
                    double num5 = (double)num4;
                    threadInfo2.weight = (float)num5;
                    // ISSUE: reference to a compiler-generated field
                    threadInfo1.threadIndex = barsCAnonStoreyAd.i;
                    groupInfo.threads.Add(threadInfo1);
                }
                if ((double)threadInfo1.weight != (double)threadInfo1.desiredWeight)
                {
                    threadInfo1.weight = (float)((double)threadInfo1.desiredWeight * (double)time + (1.0 - (double)threadInfo1.desiredWeight) * (1.0 - (double)time));
                }
                num1 += threadInfo1.weight;
            }
            float num6 = 16f * (float)groupCount;
            float num7 = (r.height - num6) / (num1 + 2f);

            using (List <ProfilerTimelineGUI.GroupInfo> .Enumerator enumerator1 = this.groups.GetEnumerator())
            {
                while (enumerator1.MoveNext())
                {
                    using (List <ProfilerTimelineGUI.ThreadInfo> .Enumerator enumerator2 = enumerator1.Current.threads.GetEnumerator())
                    {
                        while (enumerator2.MoveNext())
                        {
                            ProfilerTimelineGUI.ThreadInfo current = enumerator2.Current;
                            current.height = num7 * current.weight;
                        }
                    }
                }
            }
            this.groups[0].expanded          = true;
            this.groups[0].height            = 0.0f;
            this.groups[0].threads[0].height = 3f * num7;
        }