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

Function CreateTransientTextLayout

engine/profiler/src/profiler_render.cpp:215–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213 }
214
215 static bool CreateTransientTextLayout(HRenderProfile render_profile, dmRender::HFontMap font_map, const char* text, const dmRender::DrawTextParams& params, HTextLayout* out_layout)
216 {
217 HTextLayout layout = 0;
218 if (!CreateProfilerTextLayout(render_profile, font_map, text, params, &layout))
219 return false;
220
221 if (render_profile->m_TransientTextLayouts.Full())
222 render_profile->m_TransientTextLayouts.OffsetCapacity(32);
223 render_profile->m_TransientTextLayouts.Push(layout);
224 *out_layout = layout;
225 return true;
226 }
227
228 static HTextLayout GetOrCreateCachedTextLayout(HRenderProfile render_profile, dmRender::HFontMap font_map, const char* text, const dmRender::DrawTextParams& params)
229 {

Callers 1

Calls 4

CreateProfilerTextLayoutFunction · 0.85
FullMethod · 0.45
OffsetCapacityMethod · 0.45
PushMethod · 0.45

Tested by

no test coverage detected