示例#1
0
        private void DrawProfilingDataDetailNative(Rect r, int frameIndex, int threadIndex, float timeOffset)
        {
            bool flag  = Event.current.clickCount == 1 && Event.current.type == EventType.MouseDown;
            bool flag2 = Event.current.clickCount == 2 && Event.current.type == EventType.MouseDown;
            bool flag3 = r.Contains(Event.current.mousePosition);

            GUI.BeginGroup(r);
            ProfilingDataDrawNativeInfo profilingDataDrawNativeInfo = default(ProfilingDataDrawNativeInfo);

            profilingDataDrawNativeInfo.Reset();
            profilingDataDrawNativeInfo.trySelect             = ((!flag && !flag2) ? 0 : 1);
            profilingDataDrawNativeInfo.frameIndex            = frameIndex;
            profilingDataDrawNativeInfo.threadIndex           = threadIndex;
            profilingDataDrawNativeInfo.timeOffset            = timeOffset;
            profilingDataDrawNativeInfo.threadRect            = r;
            profilingDataDrawNativeInfo.shownAreaRect         = this.m_TimeArea.shownArea;
            profilingDataDrawNativeInfo.mousePos              = Event.current.mousePosition;
            profilingDataDrawNativeInfo.profilerColors        = ProfilerColors.colors;
            profilingDataDrawNativeInfo.nativeAllocationColor = ProfilerColors.nativeAllocation;
            profilingDataDrawNativeInfo.ghostAlpha            = 0.3f;
            profilingDataDrawNativeInfo.nonSelectedAlpha      = 0.75f;
            profilingDataDrawNativeInfo.guiStyle              = ProfilerTimelineGUI.styles.bar.m_Ptr;
            profilingDataDrawNativeInfo.lineHeight            = 16f;
            profilingDataDrawNativeInfo.textFadeOutWidth      = 20f;
            profilingDataDrawNativeInfo.textFadeStartWidth    = 50f;
            ProfilerDraw.DrawNative(ref profilingDataDrawNativeInfo);
            if (flag || flag2)
            {
                if (profilingDataDrawNativeInfo.out_SelectedPath.Length > 0)
                {
                    this.m_Window.SetSelectedPropertyPath(profilingDataDrawNativeInfo.out_SelectedPath);
                    this.m_SelectedFrameId    = frameIndex;
                    this.m_SelectedThreadId   = threadIndex;
                    this.m_SelectedInstanceId = profilingDataDrawNativeInfo.out_SelectedInstanceId;
                    this.m_SelectedTime       = profilingDataDrawNativeInfo.out_SelectedTime;
                    this.m_SelectedDur        = profilingDataDrawNativeInfo.out_SelectedDur;
                    this.m_SelectedY          = r.y + profilingDataDrawNativeInfo.out_SelectedY;
                    this.m_SelectedName       = profilingDataDrawNativeInfo.out_SelectedName;
                    this.m_SelectedRect       = r;
                    this.UpdateSelectedObject(flag, flag2);
                    Event.current.Use();
                }
                else if (flag3)
                {
                    this.ClearSelection();
                }
            }
            GUI.EndGroup();
        }
示例#2
0
 public static extern void DrawNative(ref ProfilingDataDrawNativeInfo d);
示例#3
0
 public static extern void DrawNative(ref ProfilingDataDrawNativeInfo d);