Skip to content

Commit

Permalink
feat(android): reduce layout event when size not change
Browse files Browse the repository at this point in the history
  • Loading branch information
iPel committed Oct 16, 2023
1 parent c609991 commit bef6515
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions dom/src/dom/dom_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,9 @@ LayoutResult DomNode::GetLayoutInfoFromRoot() {
void DomNode::TransferLayoutOutputsRecursive(std::vector<std::shared_ptr<DomNode>>& changed_nodes) {
auto not_equal = std::not_equal_to<>();
bool changed = layout_node_->IsDirty() || layout_node_->HasNewLayout();
#ifdef __ANDROID__
bool trigger_layout_event = true;
#else
bool trigger_layout_event =
not_equal(layout_.left, layout_node_->GetLeft()) || not_equal(layout_.top, layout_node_->GetTop()) ||
not_equal(layout_.width, layout_node_->GetWidth()) || not_equal(layout_.height, layout_node_->GetHeight());
#endif

layout_.left = layout_node_->GetLeft();
layout_.top = layout_node_->GetTop();
Expand Down

0 comments on commit bef6515

Please sign in to comment.