MCPcopy Create free account
hub / github.com/defold/defold / DuplicateProfilerFrame

Function DuplicateProfilerFrame

engine/profiler/src/profiler_render.cpp:942–961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940 }
941
942 ProfilerFrame* DuplicateProfilerFrame(const ProfilerFrame* frame)
943 {
944 ProfilerFrame* cpy = new ProfilerFrame;
945 cpy->m_Time = frame->m_Time;
946
947 uint32_t num_threads = frame->m_Threads.Size();
948 cpy->m_Threads.SetCapacity(num_threads);
949 for (uint32_t i = 0; i < num_threads; ++i)
950 {
951 cpy->m_Threads.Push(DuplicateProfilerThread(frame->m_Threads[i]));
952 }
953
954 uint32_t num_properties = frame->m_Properties.Size();
955 cpy->m_Properties.SetCapacity(num_properties);
956 for (uint32_t i = 0; i < num_properties; ++i)
957 {
958 cpy->m_Properties.Push(frame->m_Properties[i]);
959 }
960 return cpy;
961 }
962
963 void PruneProfilerThreads(ProfilerFrame* frame, uint64_t time)
964 {

Callers 2

UpdateRenderProfileFunction · 0.85
RenderProfilerFunction · 0.85

Calls 4

DuplicateProfilerThreadFunction · 0.85
SizeMethod · 0.45
SetCapacityMethod · 0.45
PushMethod · 0.45

Tested by

no test coverage detected