capture: add simple mark support

The goal here is to have an API that allows us to record things like
frame timing data. We might iterate on this API a bit, but this gets us
started.

A SpCaptureMark with a zero duration should be treated like an epoch mark
once a visualizer is created. SpCaptureMark with a non-zero duration should
be treated like a begin/end of operation. This may be useful in generating
something like a flame graph.
This commit is contained in:
Christian Hergert
2018-05-14 17:15:57 +01:00
parent e6d5d2b70d
commit 4bdbf130b2
8 changed files with 173 additions and 0 deletions

View File

@ -99,6 +99,10 @@ sp_capture_cursor_foreach (SpCaptureCursor *self,
delegate = READ_DELEGATE (sp_capture_reader_read_map);
break;
case SP_CAPTURE_FRAME_MARK:
delegate = READ_DELEGATE (sp_capture_reader_read_mark);
break;
case SP_CAPTURE_FRAME_PROCESS:
delegate = READ_DELEGATE (sp_capture_reader_read_process);
break;