ValveSoftware / vogl

OpenGL capture / playback debugger.
MIT License
1.42k stars 126 forks source link

Interactive time line #202

Closed openforeveryone closed 9 years ago

openforeveryone commented 9 years ago

Added zoom and scroll support to QTimelineView. Use Ctrl+wheel to zoom and wheel, drag time line or use scrollbar to scroll. Items on the time line can now be clicked to display the matching API call or group in the call tree view. Hovering over an item in the time line displays a tool tip with the call number, name and parameters of the call. This implements the features requested in Issue #110.

PeterLValve commented 9 years ago

How many items (api calls) were in the timeline when you tested the performance of this? I only ask because I noticed that you took away the pixmap which was being rendered to and was displayed if the timeline had not been resized but a repaint event was received. This was a huge time savings with many api calls in the timeline (hundreds of thousands to millions).

openforeveryone commented 9 years ago

I tested with 1.3 million api calls. The drawing is much faster than it used to be, 1.3M calls now takes 160ms, this used to be >900ms (Core 2 2.4Ghz) before I removed a save and restore pair inside the inner loop. I should be able to re-add the pixmap to prevent a delay when moving the current call and frame markers but repainting of the pixmap will still have to be done on every zoom and scroll-step.

PeterLValve commented 9 years ago

I don't mind the slight delay when zooming & scrolling, but users will often be moving between api calls and it's best to reduce delays in that path. Hopefully repainting the pixmap doesn't introduce much of a delay. I don't think it should from my memory.

openforeveryone commented 9 years ago

I have put the pixmap back so draw times when moving between frames are ~1ms again. I have removed the search for the current call and frame from the draw function, prior to this pull request there was a delay in drawing when heigh call numbers where selected (~200ms for call 1.3M). This search is no longer needed as a pointer to the current call or frame is passed to the time line rather than the call number.

PeterLValve commented 9 years ago

Looks good! Thank you for the new features!