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

Function SetEnabled

engine/profiler/src/profiler.cpp:258–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258void SetEnabled(bool enabled)
259{
260 if(g_ProfilerEnabled == enabled)
261 return;
262 g_ProfilerEnabled = enabled;
263
264 if (enabled)
265 {
266 dmProfiler::SetSampleTreeCallback(g_ProfilerCurrentFrame, SampleTreeCallback);
267 dmProfiler::SetPropertyTreeCallback(g_ProfilerCurrentFrame, PropertyTreeCallback);
268 }
269 else
270 {
271 dmProfiler::SetSampleTreeCallback(0, 0);
272 dmProfiler::SetPropertyTreeCallback(0, 0);
273 }
274}
275
276void ToggleProfiler()
277{

Callers 3

EnableProfilerFunction · 0.70
AppInitializeProfilerFunction · 0.70
AppFinalizeProfilerFunction · 0.70

Calls 2

SetSampleTreeCallbackFunction · 0.85
SetPropertyTreeCallbackFunction · 0.85

Tested by

no test coverage detected