From bef65155a926ae9cf8066c7b58cdc26209196121 Mon Sep 17 00:00:00 2001 From: iPel Date: Mon, 16 Oct 2023 20:18:23 +0800 Subject: [PATCH] feat(android): reduce layout event when size not change --- dom/src/dom/dom_node.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dom/src/dom/dom_node.cc b/dom/src/dom/dom_node.cc index 4e569582c28..01d5379ae5e 100644 --- a/dom/src/dom/dom_node.cc +++ b/dom/src/dom/dom_node.cc @@ -322,13 +322,9 @@ LayoutResult DomNode::GetLayoutInfoFromRoot() { void DomNode::TransferLayoutOutputsRecursive(std::vector>& 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();