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

Function DuplicateProfilerThread

engine/profiler/src/profiler_render.cpp:926–940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

924 }
925
926 static ProfilerThread* DuplicateProfilerThread(ProfilerThread* thread)
927 {
928 ProfilerThread* cpy = new ProfilerThread;
929 cpy->m_SamplesTotalTime = thread->m_SamplesTotalTime;
930 cpy->m_NameHash = thread->m_NameHash;
931
932 uint32_t num_samples = thread->m_Samples.Size();
933 cpy->m_Samples.SetCapacity(num_samples);
934
935 for (uint32_t i = 0; i < num_samples; ++i)
936 {
937 cpy->m_Samples.Push(thread->m_Samples[i]);
938 }
939 return cpy;
940 }
941
942 ProfilerFrame* DuplicateProfilerFrame(const ProfilerFrame* frame)
943 {

Callers 1

DuplicateProfilerFrameFunction · 0.85

Calls 3

SizeMethod · 0.45
SetCapacityMethod · 0.45
PushMethod · 0.45

Tested by

no test coverage detected