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

Method flush_paint

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

Source from the content-addressed store, hash-verified

65 _nodes_needing_layout.clear();
66}
67void BuildOwner::flush_paint()
68{
69 _nodes_needing_paint.sort(
70 +[](RenderObject* a, RenderObject* b) {
71 return a->depth() < b->depth();
72 });
73
74 for (auto node : _nodes_needing_paint)
75 {
76 if (node->needs_paint())
77 {
78 PaintingContext::repaint_composited_child(node);
79 }
80 else
81 {
82 PaintingContext::update_layer_properties(node);
83 }
84 }
85
86 _nodes_needing_paint.clear();
87}
88
89// register
90void BuildOwner::register_native_window(NotNull<RenderNativeWindowElement*> native_window)

Callers 1

paintMethod · 0.80

Calls 3

sortMethod · 0.45
depthMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected