📍 Job mac-m1_mini_2020-perf/blink_perf.layout complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/14255544310000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job mac-m1_mini_2020-perf/blink_perf.layout complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/16aa2ebfd10000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job mac-m1_mini_2020-perf/blink_perf.layout complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/1299b59fd10000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job mac-m1_mini_2020-perf/blink_perf.layout complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/1355c8bf310000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job mac-m1_mini_2020-perf/blink_perf.layout complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/1199da6b310000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job mac-m1_mini_2020-perf/blink_perf.layout complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/12b7ce27310000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job mac-m1_mini_2020-perf/blink_perf.layout complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/17d744ecb10000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job mac-m1_mini_2020-perf/blink_perf.layout complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/15e45698090000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job mac-m1_mini_2020-perf/blink_perf.layout complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/14755214090000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Member<const SubgridData> subgrid_data_;```suggestion
Member<const GridLayoutSubtree> grid_layout_subtree_;
```
};we could arguably remove this struct now, and just have:
void SetGridLayoutSubtree(GridLayoutSubtree* grid_layout_subtree) {Can this be const ?
GridLayoutSubtree* opt_layout_subtree,can this be const?
GridLayoutSubtree* opt_layout_subtree,Can this be const ?
GridLayoutTree* FinalizeTree() const;Can this return a const ?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job mac-m1_mini_2020-perf/blink_perf.layout complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/12d25772090000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
```suggestion
Member<const GridLayoutSubtree> grid_layout_subtree_;
```
Done
we could arguably remove this struct now, and just have:
You're right, this was just a wrapper and wasn't adding anything.
void SetGridLayoutSubtree(GridLayoutSubtree* grid_layout_subtree) {Can this be const ?
Done
GridLayoutSubtree* opt_layout_subtree,can this be const?
The diff for this comment isn't working for me - it is highlighting something already const:
`const GridLayoutSubtree* layout_subtree = nullptr;`
Can you paste the suggestion in this comment? If it's anything I missed I can do it in a follow up.
GridLayoutSubtree* opt_layout_subtree,Can this be const ?
Yeah, and also const'd `CreateConstraintSpace`
GridLayoutTree* FinalizeTree() const;Can this return a const ?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
GridLayoutSubtree* opt_layout_subtree,Kurt Catti-Schmidtcan this be const?
The diff for this comment isn't working for me - it is highlighting something already const:
`const GridLayoutSubtree* layout_subtree = nullptr;`
Can you paste the suggestion in this comment? If it's anything I missed I can do it in a follow up.
Resolving this to handle the "No Unresolved Comments" check.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
25 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h
Insertions: 1, Deletions: 1.
@@ -111,7 +111,7 @@
// Creates a copy of the current grid geometry for the entire tree in a new
// `GridLayoutTree` instance, which doesn't hold the grid items.
- GridLayoutTree* FinalizeTree() const;
+ const GridLayoutTree* FinalizeTree() const;
SubgriddedItemData LookupSubgriddedItemData(
const GridItemData& grid_item) const;
```
```
The name of the file: third_party/blink/renderer/core/layout/constraint_space_builder.h
Insertions: 1, Deletions: 1.
@@ -609,7 +609,7 @@
EnsureRareData()->SetTargetStretchBlockSizes(target_stretch_block_sizes);
}
- void SetGridLayoutSubtree(GridLayoutSubtree* grid_layout_subtree) {
+ void SetGridLayoutSubtree(const GridLayoutSubtree* grid_layout_subtree) {
#if DCHECK_IS_ON()
DCHECK(!is_grid_layout_subtree_set_);
is_grid_layout_subtree_set_ = true;
```
```
The name of the file: third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.h
Insertions: 2, Deletions: 2.
@@ -65,7 +65,7 @@
ConstraintSpace CreateConstraintSpaceForLayout(
const GridItemData& grid_item,
const GridLayoutData& layout_data,
- GridLayoutSubtree* opt_layout_subtree = nullptr,
+ const GridLayoutSubtree* opt_layout_subtree = nullptr,
LogicalRect* containing_grid_area = nullptr,
LayoutUnit unavailable_block_size = LayoutUnit(),
bool min_block_size_should_encompass_intrinsic_size = false,
@@ -162,7 +162,7 @@
const GridItemData& grid_item,
const LogicalSize& containing_grid_area_size,
const LogicalSize& fixed_available_size,
- GridLayoutSubtree* opt_layout_subtree = nullptr,
+ const GridLayoutSubtree* opt_layout_subtree = nullptr,
bool min_block_size_should_encompass_intrinsic_size = false,
std::optional<LayoutUnit> opt_child_block_offset = std::nullopt) const;
```
```
The name of the file: third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc
Insertions: 2, Deletions: 2.
@@ -1507,7 +1507,7 @@
const GridItemData& grid_item,
const LogicalSize& containing_grid_area_size,
const LogicalSize& fixed_available_size,
- GridLayoutSubtree* opt_layout_subtree,
+ const GridLayoutSubtree* opt_layout_subtree,
bool min_block_size_should_encompass_intrinsic_size,
std::optional<LayoutUnit> opt_child_block_offset) const {
const auto& container_constraint_space = GetConstraintSpace();
@@ -1557,7 +1557,7 @@
ConstraintSpace GridLayoutAlgorithm::CreateConstraintSpaceForLayout(
const GridItemData& grid_item,
const GridLayoutData& layout_data,
- GridLayoutSubtree* opt_layout_subtree,
+ const GridLayoutSubtree* opt_layout_subtree,
LogicalRect* containing_grid_area,
LayoutUnit unavailable_block_size,
bool min_block_size_should_encompass_intrinsic_size,
```
```
The name of the file: third_party/blink/renderer/core/layout/grid/grid_sizing_tree.cc
Insertions: 1, Deletions: 1.
@@ -64,7 +64,7 @@
tree_node.writing_mode = grid_node.Style().GetWritingMode();
}
-GridLayoutTree* GridSizingTree::FinalizeTree() const {
+const GridLayoutTree* GridSizingTree::FinalizeTree() const {
const auto tree_size = tree_data_.size();
HeapVector<Member<GridLayoutTree::GridTreeNode>, 16> layout_tree_data;
```
```
The name of the file: third_party/blink/renderer/core/layout/constraint_space.h
Insertions: 7, Deletions: 19.
@@ -935,7 +935,7 @@
is_adjacent_to_paper_edge_block_end(
other.is_adjacent_to_paper_edge_block_end),
line_clamp_ancestor_chain_(other.line_clamp_ancestor_chain_),
- subgrid_data_(other.subgrid_data_) {
+ grid_layout_subtree_(other.grid_layout_subtree_) {
switch (GetDataUnionType()) {
case DataUnionType::kNone:
break;
@@ -991,7 +991,7 @@
void Trace(Visitor* visitor) const {
visitor->Trace(line_clamp_ancestor_chain_);
- visitor->Trace(subgrid_data_);
+ visitor->Trace(grid_layout_subtree_);
}
bool MaySkipLayout(const RareData& other) const {
@@ -1045,7 +1045,7 @@
ignore_margins_for_stretch != other.ignore_margins_for_stretch ||
!base::ValuesEquivalent(line_clamp_ancestor_chain_,
other.line_clamp_ancestor_chain_) ||
- !base::ValuesEquivalent(subgrid_data_, other.subgrid_data_)) {
+ !base::ValuesEquivalent(grid_layout_subtree_, other.grid_layout_subtree_)) {
return false;
}
@@ -1094,7 +1094,7 @@
is_adjacent_to_paper_edge_block_start ||
is_adjacent_to_paper_edge_block_end ||
!ignore_margins_for_stretch.IsEmpty() || line_clamp_ancestor_chain_ ||
- subgrid_data_) {
+ grid_layout_subtree_) {
return false;
}
@@ -1307,11 +1307,11 @@
}
const GridLayoutSubtree* GetGridLayoutSubtree() const {
- return subgrid_data_ ? subgrid_data_->layout_subtree.Get() : nullptr;
+ return grid_layout_subtree_ ? grid_layout_subtree_.Get() : nullptr;
}
void SetGridLayoutSubtree(const GridLayoutSubtree* grid_layout_subtree) {
- subgrid_data_ = MakeGarbageCollected<SubgridData>(grid_layout_subtree);
+ grid_layout_subtree_ = grid_layout_subtree;
}
DataUnionType GetDataUnionType() const {
@@ -1536,19 +1536,7 @@
};
Member<const LineClampAncestorChain> line_clamp_ancestor_chain_;
-
- struct SubgridData : public GarbageCollected<SubgridData> {
- explicit SubgridData(const GridLayoutSubtree* layout_subtree)
- : layout_subtree(layout_subtree) {}
-
- void Trace(Visitor* visitor) const { visitor->Trace(layout_subtree); }
-
- bool operator==(const SubgridData& other) const {
- return *layout_subtree == *other.layout_subtree;
- }
- Member<const GridLayoutSubtree> layout_subtree;
- };
- Member<const SubgridData> subgrid_data_;
+ Member<const GridLayoutSubtree> grid_layout_subtree_;
};
// This struct simply allows us easily copy, compare, and initialize all the
```
[Grid] Oilpanify GridLayoutTree and GridLayoutSubtree
Moving these from the stack to the heap causes 12-14% performance
regressions in nested grid performance tests. These regressions will be
more than made up for in subsequent change that this change enables,
which move GridTrackCollection and GridLayoutData to Oilpan.
No behavioral changes are expected.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |