commit | b8407884b68108ac67fc2fcf558fc98e99f527af | [log] [tgz] |
---|---|---|
author | Ian Kilpatrick <ikilpatrick@chromium.org> | Thu Jul 19 17:31:53 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jul 19 17:31:53 2018 |
tree | a8ad8852b31b1fac5c0618bbc1c0830e6cd2e2e9 | |
parent | ee74f997cd359668736eecb9b5a1611e3dacc00f [diff] |
[LayoutNG] Reduce the copy cost of NGExclusionSpace to a tiny amount. This changes the NGExclusionSpace to use a re-generatable data-structure called "DerivedGeometry". This contains the representation which is used to perform queries on the exclusion space. At a high level exclusion spaces maintain their immutability by copying each time the information is moved from one algorithm to another (either up or down the tree). As exclusions can *only* be added, we exploit this, by making all exclusion spaces within a "copy-chain" within the same formatting context share same list of exclusions. If an exclusion gets added out-of-order e.g. when we are retrying a layout, the exclusions have a copy-on-write performed. We also exploit the fact that the expensive re-generatable data-structure typically only is used by the last exclusion space in the copy-chain, so within the copy-constructor we always std::move this to the newly created exclusion space. Bug: 635619 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: I82deed9b6147d1facd4429ba48cb5f0e1763c418 Reviewed-on: https://chromium-review.googlesource.com/1142468 Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#576544}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .