Exemplo n.º 1
0
        public void OnGUI(Rect position)
        {
            this.m_GraphViewArea = position;
            this.DrawBackground();
            this.DrawGrid();
            ZoomableArea.Begin(this.m_GraphViewArea, this.m_Host.IsDocked() ? 0f : 3f, this.m_GraphZoom);
            this.DrawNodeConnections(inspectedNodes, this.m_GraphOffset);
            this.DrawNodes(inspectedNodes.Where(x => !this.m_Selection.Contains(x)).ToArray(), this.m_GraphOffset);
            this.DrawNodes(this.m_Selection.ToArray(), this.m_GraphOffset);
            this.ConnectNodes(inspectedNodes, this.m_GraphOffset);
            ZoomableArea.End();

            GUILayout.BeginArea(this.m_GraphViewArea);
            this.OnGUI();
            this.SelectInGraph();
            this.ContextMenuClick();
            this.DragNodes();
            this.ZoomToGraph();
            this.DragGraph();
            this.ExecuteCommands();
            GUILayout.EndArea();

            if (this.m_CenterGraph)
            {
                CenterGraph();
            }
        }
Exemplo n.º 2
0
    void InitializeZoomArea()
    {
        if (m_ZoomArea != null)
        {
            m_ZoomArea = null;
        }

        m_ZoomArea = ZoomableArea.Create(true, false);

        Debug.Log("m_ZoomArea.uniformScale:" + m_ZoomArea.uniformScale);
        m_ZoomArea.uniformScale = true;
        Debug.Log(m_ZoomArea.uniformScale);
        m_ZoomArea.uniformScale = false;
        Debug.Log(m_ZoomArea.uniformScale);

        Debug.Log("m_ZoomArea.upDirection:" + m_ZoomArea.upDirection);
        Debug.Log(m_ZoomArea.upDirection);
        m_ZoomArea.upDirection = ZoomableArea.YDirection.Negative;
        Debug.Log(m_ZoomArea.upDirection);

        Debug.Log("m_ZoomArea.scale:" + m_ZoomArea.scale);
        Debug.Log(m_ZoomArea.scale);

        m_ZoomArea.Test();
        Debug.Log("====================");
        m_ZoomArea.Test1();
        Debug.Log("====================");
        m_ZoomArea.Test2();
    }
Exemplo n.º 3
0
    public void Init()
    {
        if (this.m_AddedCurves != null)
        {
            return;
        }
        this.m_AddedCurves = new List <ParticleSystemCurveEditor.CurveData>();
        this.m_Colors      = new Color[]
        {
            new Color(1f, 0.619607866f, 0.129411772f),
            new Color(0.8745098f, 0.211764708f, 0.5803922f),
            new Color(0f, 0.6862745f, 1f),
            new Color(1f, 0.921568632f, 0f),
            new Color(0.196078435f, 1f, 0.266666681f),
            new Color(0.980392158f, 0f, 0f)
        };
        this.m_AvailableColors = new List <Color>(this.m_Colors);
        ParticleSystemCurveEditor.m_CurveEditorSettings.useFocusColors   = true;
        ParticleSystemCurveEditor.m_CurveEditorSettings.showAxisLabels   = false;
        ParticleSystemCurveEditor.m_CurveEditorSettings.hRangeMin        = 0f;
        ParticleSystemCurveEditor.m_CurveEditorSettings.vRangeMin        = 0f;
        ParticleSystemCurveEditor.m_CurveEditorSettings.vRangeMax        = 1f;
        ParticleSystemCurveEditor.m_CurveEditorSettings.hRangeMax        = 1f;
        ParticleSystemCurveEditor.m_CurveEditorSettings.vSlider          = false;
        ParticleSystemCurveEditor.m_CurveEditorSettings.hSlider          = false;
        ParticleSystemCurveEditor.m_CurveEditorSettings.wrapColor        = new Color(0f, 0f, 0f, 0f);
        ParticleSystemCurveEditor.m_CurveEditorSettings.hTickLabelOffset = 5f;
        ParticleSystemCurveEditor.m_CurveEditorSettings.allowDraggingCurvesAndRegions = true;
        ParticleSystemCurveEditor.m_CurveEditorSettings.allowDeleteLastKeyInCurve     = false;
        TickStyle tickStyle = new TickStyle();

        tickStyle.color       = new Color(0f, 0f, 0f, 0.2f);
        tickStyle.distLabel   = 30;
        tickStyle.stubs       = false;
        tickStyle.centerLabel = true;
        ParticleSystemCurveEditor.m_CurveEditorSettings.hTickStyle = tickStyle;
        TickStyle tickStyle2 = new TickStyle();

        tickStyle2.color       = new Color(0f, 0f, 0f, 0.2f);
        tickStyle2.distLabel   = 20;
        tickStyle2.stubs       = false;
        tickStyle2.centerLabel = true;
        ParticleSystemCurveEditor.m_CurveEditorSettings.vTickStyle = tickStyle2;
        this.m_CurveEditor            = new CurveEditor(new Rect(0f, 0f, 1000f, 100f), this.CreateCurveWrapperArray(), false);
        this.m_CurveEditor.settings   = ParticleSystemCurveEditor.m_CurveEditorSettings;
        this.m_CurveEditor.leftmargin = 40f;
        ZoomableArea arg_2A2_0 = this.m_CurveEditor;
        float        num       = 25f;

        this.m_CurveEditor.bottommargin = num;
        num = num;
        this.m_CurveEditor.topmargin = num;
        arg_2A2_0.rightmargin        = num;
        this.m_CurveEditor.SetShownHRangeInsideMargins(ParticleSystemCurveEditor.m_CurveEditorSettings.hRangeMin, ParticleSystemCurveEditor.m_CurveEditorSettings.hRangeMax);
        this.m_CurveEditor.SetShownVRangeInsideMargins(ParticleSystemCurveEditor.m_CurveEditorSettings.vRangeMin, ParticleSystemCurveEditor.m_CurveEditorSettings.hRangeMax);
        this.m_CurveEditor.ignoreScrollWheelUntilClicked = false;
        Undo.undoRedoPerformed = (Undo.UndoRedoCallback)Delegate.Combine(Undo.undoRedoPerformed, new Undo.UndoRedoCallback(this.UndoRedoPerformed));
    }
Exemplo n.º 4
0
        void InitControls()
        {
            _nodeSelection = new NodeSelection();
            _nodeSelection.VisualEditor = this;

            _zoomArea = new ZoomableArea(1, 12, DrawZoomAreaContent);
            if (_loadedGraph != null)
            {
                _zoomArea.PanTo(_loadedGraph.ZoomOffset);
            }

            // Create the wire controller
            if (_loadedGraph != null)
            {
                _wireController = new WireController(_loadedGraph, this);
            }

            _nodeMenu = new GenericMenu();
        }
Exemplo n.º 5
0
        public void DoGUI(int frameIndex, float width, float ypos, float height)
        {
            Rect  drawRect = new Rect(0f, ypos - 1f, width, height + 1f);
            float num      = 169f;

            if (Event.current.type == EventType.Repaint)
            {
                ProfilerTimelineGUI.styles.profilerGraphBackground.Draw(drawRect, false, false, false, false);
                EditorStyles.toolbar.Draw(new Rect(0f, ypos + height - 15f, num, 15f), false, false, false, false);
            }
            bool flag = false;

            if (this.m_TimeArea == null)
            {
                flag            = true;
                this.m_TimeArea = new ZoomableArea();
                this.m_TimeArea.hRangeLocked    = false;
                this.m_TimeArea.vRangeLocked    = true;
                this.m_TimeArea.hSlider         = true;
                this.m_TimeArea.vSlider         = false;
                this.m_TimeArea.scaleWithWindow = true;
                this.m_TimeArea.rect            = new Rect(drawRect.x + num - 1f, drawRect.y, drawRect.width - num, drawRect.height);
                this.m_TimeArea.margin          = 10f;
                this.m_TimeArea.OnEnable();
            }
            ProfilerFrameDataIterator profilerFrameDataIterator = new ProfilerFrameDataIterator();

            profilerFrameDataIterator.SetRoot(frameIndex, 0);
            this.m_TimeArea.hBaseRangeMin = 0f;
            this.m_TimeArea.hBaseRangeMax = profilerFrameDataIterator.frameTimeMS;
            if (flag)
            {
                this.PerformFrameSelected(profilerFrameDataIterator.frameTimeMS);
            }
            this.m_TimeArea.rect = new Rect(drawRect.x + num, drawRect.y, drawRect.width - num, drawRect.height);
            this.m_TimeArea.BeginViewGUI();
            this.m_TimeArea.EndViewGUI();
            drawRect = this.m_TimeArea.drawRect;
            this.DrawBars(drawRect, frameIndex);
            GUI.BeginClip(this.m_TimeArea.drawRect);
            drawRect.x = 0f;
            drawRect.y = 0f;
            int num2 = 0;

            this.DoProfilerFrame(frameIndex, drawRect, false, ref num2, 0f);
            bool enabled = GUI.enabled;

            GUI.enabled = false;
            int previousFrameIndex = ProfilerDriver.GetPreviousFrameIndex(frameIndex);

            if (previousFrameIndex != -1)
            {
                ProfilerFrameDataIterator profilerFrameDataIterator2 = new ProfilerFrameDataIterator();
                profilerFrameDataIterator2.SetRoot(previousFrameIndex, 0);
                this.DoProfilerFrame(previousFrameIndex, drawRect, true, ref num2, -profilerFrameDataIterator2.frameTimeMS);
            }
            int nextFrameIndex = ProfilerDriver.GetNextFrameIndex(frameIndex);

            if (nextFrameIndex != -1)
            {
                ProfilerFrameDataIterator profilerFrameDataIterator3 = new ProfilerFrameDataIterator();
                profilerFrameDataIterator3.SetRoot(frameIndex, 0);
                this.DoProfilerFrame(nextFrameIndex, drawRect, true, ref num2, profilerFrameDataIterator3.frameTimeMS);
            }
            GUI.enabled = enabled;
            GUI.EndClip();
        }
Exemplo n.º 6
0
 public void DoGUI(FrameDataView frameDataView, float width, float ypos, float height)
 {
     if (frameDataView == null || !frameDataView.IsValid())
     {
         GUILayout.Label(ProfilerFrameDataViewBase.BaseStyles.noData, ProfilerFrameDataViewBase.BaseStyles.label, new GUILayoutOption[0]);
     }
     else
     {
         Rect  drawRect = new Rect(0f, ypos - 1f, width, height + 1f);
         float num      = 179f;
         if (Event.current.type == EventType.Repaint)
         {
             ProfilerTimelineGUI.styles.profilerGraphBackground.Draw(drawRect, false, false, false, false);
             EditorStyles.toolbar.Draw(new Rect(0f, ypos + height - 15f, num, 15f), false, false, false, false);
         }
         bool flag = false;
         if (this.m_TimeArea == null)
         {
             flag            = true;
             this.m_TimeArea = new ZoomableArea();
             this.m_TimeArea.hRangeLocked    = false;
             this.m_TimeArea.vRangeLocked    = true;
             this.m_TimeArea.hSlider         = true;
             this.m_TimeArea.vSlider         = false;
             this.m_TimeArea.scaleWithWindow = true;
             this.m_TimeArea.rect            = new Rect(drawRect.x + num - 1f, drawRect.y, drawRect.width - num, drawRect.height);
             this.m_TimeArea.margin          = 10f;
         }
         if (flag)
         {
             NativeProfilerTimeline_InitializeArgs nativeProfilerTimeline_InitializeArgs = default(NativeProfilerTimeline_InitializeArgs);
             nativeProfilerTimeline_InitializeArgs.Reset();
             nativeProfilerTimeline_InitializeArgs.ghostAlpha         = 0.3f;
             nativeProfilerTimeline_InitializeArgs.nonSelectedAlpha   = 0.75f;
             nativeProfilerTimeline_InitializeArgs.guiStyle           = ProfilerTimelineGUI.styles.bar.m_Ptr;
             nativeProfilerTimeline_InitializeArgs.lineHeight         = 16f;
             nativeProfilerTimeline_InitializeArgs.textFadeOutWidth   = 20f;
             nativeProfilerTimeline_InitializeArgs.textFadeStartWidth = 50f;
             NativeProfilerTimeline.Initialize(ref nativeProfilerTimeline_InitializeArgs);
         }
         ProfilerFrameDataIterator profilerFrameDataIterator = new ProfilerFrameDataIterator();
         int threadCount = profilerFrameDataIterator.GetThreadCount(frameDataView.frameIndex);
         profilerFrameDataIterator.SetRoot(frameDataView.frameIndex, 0);
         this.m_TimeArea.hBaseRangeMin = 0f;
         this.m_TimeArea.hBaseRangeMax = profilerFrameDataIterator.frameTimeMS;
         if (flag)
         {
             this.PerformFrameSelected(profilerFrameDataIterator.frameTimeMS);
         }
         this.m_TimeArea.rect = new Rect(drawRect.x + num, drawRect.y, drawRect.width - num, drawRect.height);
         this.m_TimeArea.BeginViewGUI();
         this.m_TimeArea.EndViewGUI();
         drawRect = this.m_TimeArea.drawRect;
         this.DrawGrid(drawRect, profilerFrameDataIterator.frameTimeMS);
         this.MarkDeadOrClearThread();
         this.CalculateBars(ref profilerFrameDataIterator, drawRect, frameDataView.frameIndex, this.animationTime);
         this.DrawBars(drawRect, frameDataView.frameIndex);
         this.DoRangeSelection(this.m_TimeArea.drawRect);
         GUI.BeginClip(this.m_TimeArea.drawRect);
         drawRect.x = 0f;
         drawRect.y = 0f;
         bool enabled = GUI.enabled;
         GUI.enabled = false;
         int   num2 = (!this.m_Window.IsRecording()) ? 3 : 1;
         int   num3 = num2;
         int   num4 = frameDataView.frameIndex;
         float num5 = 0f;
         do
         {
             int previousFrameIndex = ProfilerDriver.GetPreviousFrameIndex(num4);
             if (previousFrameIndex == -1)
             {
                 break;
             }
             profilerFrameDataIterator.SetRoot(previousFrameIndex, 0);
             num5 -= profilerFrameDataIterator.frameTimeMS;
             num4  = previousFrameIndex;
             num3--;
         }while (num5 > this.m_TimeArea.shownArea.x && num3 > 0);
         while (num4 != -1 && num4 != frameDataView.frameIndex)
         {
             profilerFrameDataIterator.SetRoot(num4, 0);
             this.DoProfilerFrame(num4, drawRect, true, threadCount, num5);
             num5 += profilerFrameDataIterator.frameTimeMS;
             num4  = ProfilerDriver.GetNextFrameIndex(num4);
         }
         num3 = num2;
         num4 = frameDataView.frameIndex;
         num5 = 0f;
         while (num5 < this.m_TimeArea.shownArea.x + this.m_TimeArea.shownArea.width && num3 >= 0)
         {
             if (frameDataView.frameIndex != num4)
             {
                 this.DoProfilerFrame(num4, drawRect, true, threadCount, num5);
             }
             profilerFrameDataIterator.SetRoot(num4, 0);
             num4 = ProfilerDriver.GetNextFrameIndex(num4);
             if (num4 == -1)
             {
                 break;
             }
             num5 += profilerFrameDataIterator.frameTimeMS;
             num3--;
         }
         GUI.enabled = enabled;
         threadCount = 0;
         this.DoProfilerFrame(frameDataView.frameIndex, drawRect, false, threadCount, 0f);
         GUI.EndClip();
         this.DoSelectionTooltip(frameDataView.frameIndex, this.m_TimeArea.drawRect);
     }
 }
Exemplo n.º 7
0
        public void DoGUI(int frameIndex, float width, float ypos, float height)
        {
            Rect  drawRect = new Rect(0f, ypos - 1f, width, height + 1f);
            float num      = 169f;

            if (Event.current.type == EventType.Repaint)
            {
                ProfilerTimelineGUI.styles.profilerGraphBackground.Draw(drawRect, false, false, false, false);
                EditorStyles.toolbar.Draw(new Rect(0f, ypos + height - 15f, num, 15f), false, false, false, false);
            }
            bool flag = false;

            if (this.m_TimeArea == null)
            {
                flag            = true;
                this.m_TimeArea = new ZoomableArea();
                this.m_TimeArea.hRangeLocked    = false;
                this.m_TimeArea.vRangeLocked    = true;
                this.m_TimeArea.hSlider         = true;
                this.m_TimeArea.vSlider         = false;
                this.m_TimeArea.scaleWithWindow = true;
                this.m_TimeArea.rect            = new Rect(drawRect.x + num - 1f, drawRect.y, drawRect.width - num, drawRect.height);
                this.m_TimeArea.margin          = 10f;
            }
            if (flag)
            {
                NativeProfilerTimeline_InitializeArgs nativeProfilerTimeline_InitializeArgs = default(NativeProfilerTimeline_InitializeArgs);
                nativeProfilerTimeline_InitializeArgs.Reset();
                nativeProfilerTimeline_InitializeArgs.profilerColors        = ProfilerColors.colors;
                nativeProfilerTimeline_InitializeArgs.allocationSampleColor = ProfilerColors.allocationSample;
                nativeProfilerTimeline_InitializeArgs.internalSampleColor   = ProfilerColors.internalSample;
                nativeProfilerTimeline_InitializeArgs.ghostAlpha            = 0.3f;
                nativeProfilerTimeline_InitializeArgs.nonSelectedAlpha      = 0.75f;
                nativeProfilerTimeline_InitializeArgs.guiStyle           = ProfilerTimelineGUI.styles.bar.m_Ptr;
                nativeProfilerTimeline_InitializeArgs.lineHeight         = 16f;
                nativeProfilerTimeline_InitializeArgs.textFadeOutWidth   = 20f;
                nativeProfilerTimeline_InitializeArgs.textFadeStartWidth = 50f;
                NativeProfilerTimeline.Initialize(ref nativeProfilerTimeline_InitializeArgs);
            }
            ProfilerFrameDataIterator profilerFrameDataIterator = new ProfilerFrameDataIterator();

            profilerFrameDataIterator.SetRoot(frameIndex, 0);
            this.m_TimeArea.hBaseRangeMin = 0f;
            this.m_TimeArea.hBaseRangeMax = profilerFrameDataIterator.frameTimeMS;
            if (flag)
            {
                this.PerformFrameSelected(profilerFrameDataIterator.frameTimeMS);
            }
            this.m_TimeArea.rect = new Rect(drawRect.x + num, drawRect.y, drawRect.width - num, drawRect.height);
            this.m_TimeArea.BeginViewGUI();
            this.m_TimeArea.EndViewGUI();
            drawRect = this.m_TimeArea.drawRect;
            this.CalculateBars(drawRect, frameIndex, this.animationTime);
            this.DrawBars(drawRect, frameIndex);
            GUI.BeginClip(this.m_TimeArea.drawRect);
            drawRect.x = 0f;
            drawRect.y = 0f;
            bool enabled = GUI.enabled;

            GUI.enabled = false;
            ProfilerFrameDataIterator profilerFrameDataIterator2 = new ProfilerFrameDataIterator();
            int threadCount        = profilerFrameDataIterator2.GetThreadCount(frameIndex);
            int previousFrameIndex = ProfilerDriver.GetPreviousFrameIndex(frameIndex);

            if (previousFrameIndex != -1)
            {
                profilerFrameDataIterator2.SetRoot(previousFrameIndex, 0);
                this.DoProfilerFrame(previousFrameIndex, drawRect, true, threadCount, -profilerFrameDataIterator2.frameTimeMS);
            }
            int nextFrameIndex = ProfilerDriver.GetNextFrameIndex(frameIndex);

            if (nextFrameIndex != -1)
            {
                profilerFrameDataIterator2.SetRoot(frameIndex, 0);
                this.DoProfilerFrame(nextFrameIndex, drawRect, true, threadCount, profilerFrameDataIterator2.frameTimeMS);
            }
            GUI.enabled = enabled;
            threadCount = 0;
            this.DoProfilerFrame(frameIndex, drawRect, false, threadCount, 0f);
            GUI.EndClip();
            this.DoSelectionTooltip(frameIndex, this.m_TimeArea.drawRect);
        }
Exemplo n.º 8
0
        public void DoGUI(FrameDataView frameDataView, float width, float ypos, float height)
        {
            if (frameDataView == null || !frameDataView.IsValid())
            {
                GUILayout.Label(BaseStyles.noData, BaseStyles.label);
                return;
            }

            Rect  fullRect  = new Rect(0, ypos - 1, width, height + 1);
            float sideWidth = Chart.kSideWidth - 1;

            if (Event.current.type == EventType.Repaint)
            {
                styles.profilerGraphBackground.Draw(fullRect, false, false, false, false);
                // The bar in the lower left side that fills the space next to the horizontal scrollbar.
                EditorStyles.toolbar.Draw(new Rect(0, ypos + height - 15, sideWidth, 15), false, false, false, false);
            }

            bool initializing = false;

            if (m_TimeArea == null)
            {
                initializing               = true;
                m_TimeArea                 = new ZoomableArea();
                m_TimeArea.hRangeLocked    = false;
                m_TimeArea.vRangeLocked    = true;
                m_TimeArea.hSlider         = true;
                m_TimeArea.vSlider         = false;
                m_TimeArea.scaleWithWindow = true;
                m_TimeArea.rect            = new Rect(fullRect.x + sideWidth - 1, fullRect.y, fullRect.width - sideWidth, fullRect.height);
                m_TimeArea.margin          = 10;
            }

            if (initializing)
            {
                NativeProfilerTimeline_InitializeArgs args = new NativeProfilerTimeline_InitializeArgs();
                args.Reset();
                args.ghostAlpha         = 0.3f;
                args.nonSelectedAlpha   = 0.75f;
                args.guiStyle           = styles.bar.m_Ptr;
                args.lineHeight         = kLineHeight;
                args.textFadeOutWidth   = kTextFadeOutWidth;
                args.textFadeStartWidth = kTextFadeStartWidth;

                NativeProfilerTimeline.Initialize(ref args);
            }

            var iter        = new ProfilerFrameDataIterator();
            int threadCount = iter.GetThreadCount(frameDataView.frameIndex);

            iter.SetRoot(frameDataView.frameIndex, 0);
            m_TimeArea.hBaseRangeMin = 0;
            m_TimeArea.hBaseRangeMax = iter.frameTimeMS;
            if (initializing)
            {
                PerformFrameSelected(iter.frameTimeMS);
            }

            m_TimeArea.rect = new Rect(fullRect.x + sideWidth, fullRect.y, fullRect.width - sideWidth, fullRect.height);
            m_TimeArea.BeginViewGUI();
            m_TimeArea.EndViewGUI();

            fullRect = m_TimeArea.drawRect;

            DrawGrid(fullRect, iter.frameTimeMS);

            MarkDeadOrClearThread();
            CalculateBars(ref iter, fullRect, frameDataView.frameIndex, animationTime);
            DrawBars(fullRect, frameDataView.frameIndex);

            DoRangeSelection(m_TimeArea.drawRect);

            GUI.BeginClip(m_TimeArea.drawRect);
            fullRect.x = 0;
            fullRect.y = 0;

            bool oldEnabled = GUI.enabled;

            GUI.enabled = false;
            // Walk backwards to find how many previous frames we need to show.
            int   maxContextFramesToShow = m_Window.IsRecording() ? 1 : 3;
            int   numContextFramesToShow = maxContextFramesToShow;
            int   currentFrame           = frameDataView.frameIndex;
            float currentTime            = 0;

            do
            {
                int prevFrame = ProfilerDriver.GetPreviousFrameIndex(currentFrame);
                if (prevFrame == -1)
                {
                    break;
                }
                iter.SetRoot(prevFrame, 0);
                currentTime -= iter.frameTimeMS;
                currentFrame = prevFrame;
                --numContextFramesToShow;
            }while (currentTime > m_TimeArea.shownArea.x && numContextFramesToShow > 0);

            // Draw previous frames
            while (currentFrame != -1 && currentFrame != frameDataView.frameIndex)
            {
                iter.SetRoot(currentFrame, 0);
                DoProfilerFrame(currentFrame, fullRect, true, threadCount, currentTime);
                currentTime += iter.frameTimeMS;
                currentFrame = ProfilerDriver.GetNextFrameIndex(currentFrame);
            }

            // Draw next frames
            numContextFramesToShow = maxContextFramesToShow;
            currentFrame           = frameDataView.frameIndex;
            currentTime            = 0;
            while (currentTime < m_TimeArea.shownArea.x + m_TimeArea.shownArea.width && numContextFramesToShow >= 0)
            {
                if (frameDataView.frameIndex != currentFrame)
                {
                    DoProfilerFrame(currentFrame, fullRect, true, threadCount, currentTime);
                }
                iter.SetRoot(currentFrame, 0);
                currentFrame = ProfilerDriver.GetNextFrameIndex(currentFrame);
                if (currentFrame == -1)
                {
                    break;
                }
                currentTime += iter.frameTimeMS;
                --numContextFramesToShow;
            }

            GUI.enabled = oldEnabled;

            // Draw center frame last to get on top
            threadCount = 0;
            DoProfilerFrame(frameDataView.frameIndex, fullRect, false, threadCount, 0);

            GUI.EndClip();

            // Draw tooltips on top of clip to be able to extend outside of timeline area
            DoSelectionTooltip(frameDataView.frameIndex, m_TimeArea.drawRect);
        }