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

Function DrawProfilerTextCached

engine/profiler/src/profiler_render.cpp:247–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245 }
246
247 static void DrawProfilerTextCached(HRenderProfile render_profile, dmRender::HRenderContext render_context, dmRender::HFontMap font_map, uint64_t batch_key, const dmRender::DrawTextParams& params, const char* text)
248 {
249 HTextLayout layout = GetOrCreateCachedTextLayout(render_profile, font_map, text, params);
250 if (layout)
251 {
252 DrawProfilerTextLayout(render_context, font_map, batch_key, params, layout);
253 return;
254 }
255
256 dmRender::DrawTextParams raw_params = params;
257 raw_params.m_Text = text ? text : "";
258 raw_params.m_TextLayout = 0;
259 dmRender::DrawText(render_context, font_map, 0, batch_key, raw_params);
260 }
261
262 static void DrawProfilerTextTransient(HRenderProfile render_profile, dmRender::HRenderContext render_context, dmRender::HFontMap font_map, uint64_t batch_key, const dmRender::DrawTextParams& params, const char* text)
263 {

Callers 1

DrawFunction · 0.85

Calls 3

DrawProfilerTextLayoutFunction · 0.85
DrawTextFunction · 0.85

Tested by

no test coverage detected