Remove assumptions that captures are always frames

* Previously we had "Frame X" and "Start of Frame" hardcoded in the event
  browser, and the end of frame was in many cases assumed to be a present call.
  However with the in-application API this is not necessarily true.
* Presents are now serialised separately in all APIs and displayed wherever they
  happen in the frame, and if there is no present at the end of the frame an
  "End of Capture" marker is inserted. Similarly API-defined captures are not
  given a potentially misleading frame number.
This commit is contained in:
baldurk
2019-11-21 13:52:38 +00:00
parent cb216441fe
commit 4458ab3205
37 changed files with 454 additions and 147 deletions
+7 -3
View File
@@ -238,11 +238,15 @@ EventBrowser::~EventBrowser()
void EventBrowser::OnCaptureLoaded()
{
RDTreeWidgetItem *frame = new RDTreeWidgetItem(
{QFormatStr("Frame #%1").arg(m_Ctx.FrameInfo().frameNumber), QString(), QString(), QString()});
uint32_t frameNumber = m_Ctx.FrameInfo().frameNumber;
QString rootName =
frameNumber == ~0U ? tr("User-defined Capture") : tr("Frame #%1").arg(frameNumber);
RDTreeWidgetItem *frame = new RDTreeWidgetItem({rootName, QString(), QString(), QString()});
RDTreeWidgetItem *framestart =
new RDTreeWidgetItem({tr("Frame Start"), lit("0"), lit("0"), QString()});
new RDTreeWidgetItem({tr("Capture Start"), lit("0"), lit("0"), QString()});
framestart->setTag(QVariant::fromValue(EventItemTag(0, 0)));
frame->addChild(framestart);