MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / flush_layout

Method flush_layout

modules/gui/gui/src/framework/build_owner.cpp:48–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 _dirty_elements.clear();
47}
48void BuildOwner::flush_layout()
49{
50 _nodes_needing_layout.sort(
51 +[](RenderObject* a, RenderObject* b) {
52 return a->depth() < b->depth();
53 });
54
55 for (auto node : _nodes_needing_layout)
56 {
57 if (node->needs_layout() && node->owner() == this)
58 {
59 node->perform_layout();
60 node->_needs_layout = false;
61 node->mark_needs_paint();
62 }
63 }
64
65 _nodes_needing_layout.clear();
66}
67void BuildOwner::flush_paint()
68{
69 _nodes_needing_paint.sort(

Callers 1

layoutMethod · 0.80

Calls 5

mark_needs_paintMethod · 0.80
sortMethod · 0.45
depthMethod · 0.45
perform_layoutMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected