MCPcopy Create free account
hub / github.com/baldurk/renderdoc / GetParentMarker

Function GetParentMarker

qrenderdoc/Code/QRDUtils.cpp:1885–1925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1883}
1884
1885static const ActionDescription *GetParentMarker(ICaptureContext &ctx, uint32_t eventId)
1886{
1887 const ActionDescription *parent = ctx.GetAction(eventId);
1888 if(!parent)
1889 {
1890 rdcarray<const ActionDescription *> actions;
1891 // Search the actions to find which action contains this eventId
1892 for(const ActionDescription &action : ctx.CurRootActions())
1893 actions.push_back(&action);
1894
1895 while(!parent && !actions.empty())
1896 {
1897 const ActionDescription *action = actions.back();
1898 for(const APIEvent &event : action->events)
1899 {
1900 if(event.eventId == eventId)
1901 {
1902 parent = action;
1903 break;
1904 }
1905 }
1906 actions.pop_back();
1907 bool addChildren = (action->eventId < eventId);
1908 if(!addChildren)
1909 {
1910 if(!action->children.empty())
1911 addChildren = action->children[0].eventId < eventId;
1912 }
1913
1914 if(addChildren)
1915 {
1916 for(const ActionDescription &child : action->children)
1917 actions.push_back(&child);
1918 }
1919 }
1920 }
1921 while(parent != NULL && (parent->flags != ActionFlags::PushMarker))
1922 parent = parent->parent;
1923
1924 return parent;
1925}
1926
1927QString GetParentMarkerName(ICaptureContext &ctx, uint32_t eventId)
1928{

Callers 3

GetParentMarkerNameFunction · 0.85
GetParentMarkerPathFunction · 0.85
GetParentMarkerEventIdFunction · 0.85

Calls 5

GetActionMethod · 0.45
push_backMethod · 0.45
emptyMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected