Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Issue 2430313004: Paint collapsed borders of a table as one display item (Closed)

Created:
4 years, 2 months ago by Xianzhu
Modified:
4 years, 1 month ago
Reviewers:
chrishtr, wkorman
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Paint collapsed borders of a table as one display item This simplifies paint invalidation logic on collapsed border changes. About performance: With this CL we create a big display item on the table containing all collapsed border paintings, instead of many small display items on cells. This will cause more painting when the display item is invalidated, but saves time to handle many cached display items. Perf try jobs [1] show that this CL actually improves performance of one test (blink_perf.paint.large-table-background-change-with-invisible-collapsed-borders.html), and doesn't affect much of performance of other tests. Cluster-telemetry run showed no change or slight progression [2]. [1] https://codereview.chromium.org/2430313004/#ps60001 [2] https://ct.skia.org/chromium_perf_runs/, run 1433 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 BUG=663208 Committed: https://crrev.com/c5cc11e88930c6e3f5e08b330fb14b6b571a0404 Cr-Commit-Position: refs/heads/master@{#431744}

Patch Set 1 #

Patch Set 2 : With solid-color optimization #

Patch Set 3 : Paint collapsed borders of a table as one display item #

Patch Set 4 : Rebase and perf results #

Patch Set 5 : - #

Total comments: 4

Patch Set 6 : Rebaseline-cl #

Total comments: 6

Patch Set 7 : - #

Patch Set 8 : Improve raster performance #

Total comments: 2

Patch Set 9 : invalidatePaintRectangle #

Patch Set 10 : Rebaseline on mac and win #

Unified diffs Side-by-side diffs Delta from patch set Stats (+560 lines, -576 lines) Patch
M third_party/WebKit/LayoutTests/paint/invalidation/table-cell-collapsed-border-expected.txt View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -42 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table-outer-border-expected.txt View 1 2 3 4 5 1 chunk +0 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table/border-collapse-change-separate-to-collapse-expected.txt View 1 2 3 4 5 1 chunk +0 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table/cached-cell-append-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-cell-border-color-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-cell-border-width-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-col-border-color-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -14 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-col-border-width-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -14 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-colgroup-border-color-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -22 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-colgroup-border-width-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -22 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-row-border-width-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-table-border-color-expected.txt View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-table-border-width-expected.txt View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-tbody-border-width-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -22 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/table/composited-cell-change-collapsed-border-color.html View 1 2 3 4 5 6 7 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/table/composited-cell-change-collapsed-border-color-expected.html View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/table/composited-cell-change-collapsed-border-color-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +45 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/table/composited-row-change-collapsed-border-color.html View 1 2 3 4 5 6 7 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/table/composited-row-change-collapsed-border-color-expected.html View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/table/composited-row-change-collapsed-border-color-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/table/composited-section-change-collapsed-border-color.html View 1 2 3 4 5 6 7 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/table/composited-section-change-collapsed-border-color-expected.html View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/table/composited-section-change-collapsed-border-color-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +41 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/table-cell-collapsed-border-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -42 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/table-collapsed-border-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -24 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/table/cached-change-cell-sl-border-color-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table-collapsed-border-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -24 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table/cached-change-cell-sl-border-color-expected.txt View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table-collapsed-border-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -24 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table/cached-change-cell-sl-border-color-expected.txt View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTable.h View 1 2 3 4 4 chunks +20 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTable.cpp View 1 2 3 4 5 6 7 8 4 chunks +24 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableCell.h View 1 2 3 4 5 6 7 8 5 chunks +13 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableCell.cpp View 1 2 3 4 5 6 7 4 chunks +25 lines, -81 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableSection.h View 1 2 3 4 3 chunks +12 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintInvalidator.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/paint/TableCellPainter.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/TableCellPainter.cpp View 1 2 3 4 chunks +18 lines, -48 lines 0 comments Download
M third_party/WebKit/Source/core/paint/TableCellPainterTest.cpp View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/TablePainter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/TablePainter.cpp View 1 2 3 4 5 6 1 chunk +49 lines, -19 lines 0 comments Download
A third_party/WebKit/Source/core/paint/TablePainterTest.cpp View 1 2 3 4 1 chunk +75 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/TableSectionPainter.h View 1 2 3 4 3 chunks +8 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/paint/TableSectionPainter.cpp View 1 2 3 4 5 3 chunks +14 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h View 1 2 3 2 chunks +1 line, -22 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/DisplayItem.cpp View 1 2 2 chunks +1 line, -17 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 61 (38 generated)
Xianzhu
4 years, 1 month ago (2016-11-02 23:28:40 UTC) #16
wkorman
lgtm I'm in favor of landing this ahead of my change http://crrev.com/2469903002 and we can ...
4 years, 1 month ago (2016-11-03 05:26:13 UTC) #17
Xianzhu
On 2016/11/03 05:26:13, wkorman wrote: > lgtm > > I'm in favor of landing this ...
4 years, 1 month ago (2016-11-03 15:46:09 UTC) #18
Xianzhu
https://codereview.chromium.org/2430313004/diff/80001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp File third_party/WebKit/Source/core/layout/LayoutTableCell.cpp (left): https://codereview.chromium.org/2430313004/diff/80001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp#oldcode1433 third_party/WebKit/Source/core/layout/LayoutTableCell.cpp:1433: void LayoutTableCell::invalidateDisplayItemClients( On 2016/11/03 05:26:13, wkorman wrote: > I ...
4 years, 1 month ago (2016-11-03 16:06:13 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2430313004/100001
4 years, 1 month ago (2016-11-03 21:01:32 UTC) #29
chrishtr
https://codereview.chromium.org/2430313004/diff/100001/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp File third_party/WebKit/Source/core/paint/PaintInvalidator.cpp (right): https://codereview.chromium.org/2430313004/diff/100001/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp#newcode212 third_party/WebKit/Source/core/paint/PaintInvalidator.cpp:212: if (object.isTable() && toLayoutTable(object).hasCollapsedBorders()) The old code was just ...
4 years, 1 month ago (2016-11-03 21:16:29 UTC) #30
Xianzhu
https://codereview.chromium.org/2430313004/diff/100001/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp File third_party/WebKit/Source/core/paint/PaintInvalidator.cpp (right): https://codereview.chromium.org/2430313004/diff/100001/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp#newcode212 third_party/WebKit/Source/core/paint/PaintInvalidator.cpp:212: if (object.isTable() && toLayoutTable(object).hasCollapsedBorders()) On 2016/11/03 21:16:29, chrishtr wrote: ...
4 years, 1 month ago (2016-11-03 21:26:55 UTC) #31
wkorman
On 2016/11/03 15:46:09, Xianzhu wrote: > Added in descriptions. I ran blink_perf.paint perf suite which ...
4 years, 1 month ago (2016-11-07 23:25:24 UTC) #32
Xianzhu
On 2016/11/07 23:25:24, wkorman wrote: > On 2016/11/03 15:46:09, Xianzhu wrote: > > Added in ...
4 years, 1 month ago (2016-11-07 23:35:50 UTC) #33
Xianzhu
Filed a bug and added performance data in crbug.com/647809. Rasterization performance seems a blocking issue ...
4 years, 1 month ago (2016-11-08 01:38:02 UTC) #34
Xianzhu
On 2016/11/08 01:38:02, Xianzhu wrote: > Filed a bug and added performance data in crbug.com/647809. ...
4 years, 1 month ago (2016-11-08 01:38:17 UTC) #35
Xianzhu
The latest patch improves raster performance by not always invalidating the whole table's visual rect. ...
4 years, 1 month ago (2016-11-10 23:23:43 UTC) #39
chrishtr
On 2016/11/10 at 23:23:43, wangxianzhu wrote: > The latest patch improves raster performance by not ...
4 years, 1 month ago (2016-11-11 01:39:18 UTC) #42
wkorman
On 2016/11/11 01:39:18, chrishtr wrote: > On 2016/11/10 at 23:23:43, wangxianzhu wrote: > > The ...
4 years, 1 month ago (2016-11-11 02:07:13 UTC) #43
wkorman
lgtm > We can try to use one display item for each row for collapsed ...
4 years, 1 month ago (2016-11-11 02:19:42 UTC) #44
Xianzhu
On 2016/11/11 01:39:18, chrishtr wrote: > On 2016/11/10 at 23:23:43, wangxianzhu wrote: > > The ...
4 years, 1 month ago (2016-11-11 05:44:27 UTC) #46
chrishtr
https://codereview.chromium.org/2430313004/diff/140001/third_party/WebKit/Source/core/layout/LayoutTable.cpp File third_party/WebKit/Source/core/layout/LayoutTable.cpp (right): https://codereview.chromium.org/2430313004/diff/140001/third_party/WebKit/Source/core/layout/LayoutTable.cpp#newcode819 third_party/WebKit/Source/core/layout/LayoutTable.cpp:819: if (changedWithChildCompositedLayers) { How about using invalidatePaintRectangle of the ...
4 years, 1 month ago (2016-11-11 19:18:01 UTC) #47
Xianzhu
https://codereview.chromium.org/2430313004/diff/140001/third_party/WebKit/Source/core/layout/LayoutTable.cpp File third_party/WebKit/Source/core/layout/LayoutTable.cpp (right): https://codereview.chromium.org/2430313004/diff/140001/third_party/WebKit/Source/core/layout/LayoutTable.cpp#newcode819 third_party/WebKit/Source/core/layout/LayoutTable.cpp:819: if (changedWithChildCompositedLayers) { On 2016/11/11 19:18:01, chrishtr wrote: > ...
4 years, 1 month ago (2016-11-11 20:09:30 UTC) #50
chrishtr
lgtm
4 years, 1 month ago (2016-11-11 20:56:48 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2430313004/180001
4 years, 1 month ago (2016-11-11 23:06:31 UTC) #56
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 1 month ago (2016-11-12 02:14:37 UTC) #58
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/c5cc11e88930c6e3f5e08b330fb14b6b571a0404 Cr-Commit-Position: refs/heads/master@{#431744}
4 years, 1 month ago (2016-11-12 02:16:21 UTC) #60
Xianzhu
4 years, 1 month ago (2016-11-14 17:00:55 UTC) #61
Message was sent while issue was closed.
A revert of this CL (patchset #10 id:180001) has been created in
https://codereview.chromium.org/2495343002/ by wangxianzhu@chromium.org.

The reason for reverting is: Caused bug 664887. We miss invalidation of
collapsed borders when they are changed by layout.

BUG=664887.

Powered by Google App Engine
This is Rietveld 408576698