MCPcopy Create free account
hub / github.com/WayfireWM/wayfire / _dump_scene

Function _dump_scene

src/debug.cpp:394–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394static void _dump_scene(wf::scene::node_ptr root, int depth = 0)
395{
396 using namespace wf::scene;
397
398 // root
399 // |-child
400 // | |-nested
401 // | | |-nested2
402 //
403 std::ostringstream node_line;
404 for (int i = 0; i < depth; i++)
405 {
406 node_line << "|";
407 if (i < depth - 1)
408 {
409 node_line << " ";
410 } else
411 {
412 node_line << "-";
413 }
414 }
415
416 node_line << root->stringify();
417 node_line << " [" + fmt_pointer(root.get()) + "]";
418 node_line << " geometry=" << root->get_bounding_box();
419
420 const int greyed_flags = (int)node_flags::DISABLED;
421 if (root->flags() & greyed_flags)
422 {
423 color_debug_log(GREY_COLOR, node_line.str());
424 } else
425 {
426 color_debug_log(CLEAR_COLOR, node_line.str());
427 }
428
429 for (auto& ch : root->get_children())
430 {
431 _dump_scene(ch, depth + 1);
432 }
433}
434
435void wf::dump_scene(scene::node_ptr root)
436{

Callers 1

dump_sceneMethod · 0.85

Calls 6

fmt_pointerFunction · 0.85
color_debug_logFunction · 0.85
stringifyMethod · 0.45
getMethod · 0.45
get_bounding_boxMethod · 0.45
flagsMethod · 0.45

Tested by

no test coverage detected