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

Issue 1549693002: Optimize collapsed border painting (Closed)

Created:
5 years ago by Xianzhu
Modified:
4 years, 7 months ago
Reviewers:
chrishtr
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dshwang, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Optimize collapsed border painting Save cached collapsed borders in LayoutTableCell OwnPtr field instead of in LayoutTableSection hash map to reduce number of hash lookups. Previously during collectBorderValues, each cell needed 4 hash lookups, and during painting, each cell needed another 4 hash lookups. BUG=34736 Committed: https://crrev.com/e2e24217bf6051b94756337f8d8cd183ffbebd30 Cr-Commit-Position: refs/heads/master@{#391867}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Field instead of global HashMap #

Total comments: 13

Patch Set 4 : Rebase #

Patch Set 5 : Rebase #

Patch Set 6 : Remove extra dtor #

Patch Set 7 : Rebase #

Patch Set 8 : #

Patch Set 9 : #

Total comments: 6

Patch Set 10 : #

Total comments: 6

Patch Set 11 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -142 lines) Patch
M third_party/WebKit/Source/core/layout/LayoutTableCell.h View 1 2 3 4 5 6 2 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableCell.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +32 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableSection.h View 1 2 3 4 5 6 3 chunks +0 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableSection.cpp View 1 2 3 4 5 6 1 chunk +0 lines, -37 lines 0 comments Download
M third_party/WebKit/Source/core/paint/TableCellPainter.h View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/paint/TableCellPainter.cpp View 1 2 3 4 5 6 3 chunks +39 lines, -60 lines 0 comments Download
M third_party/WebKit/Source/core/style/CollapsedBorderValue.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 27 (7 generated)
Xianzhu
https://codereview.chromium.org/1549693002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTableCell.h File third_party/WebKit/Source/core/layout/LayoutTableCell.h (right): https://codereview.chromium.org/1549693002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTableCell.h#newcode367 third_party/WebKit/Source/core/layout/LayoutTableCell.h:367: OwnPtr<CollapsedBorderValues> m_collapsedBorderValues; Using this field (instead of global maps), ...
4 years, 12 months ago (2015-12-28 21:27:16 UTC) #2
Julien - ping for review
I really like the optimization around not caching invisible collapsing borders. The other one needs ...
4 years, 11 months ago (2016-01-08 14:18:15 UTC) #3
Xianzhu
https://codereview.chromium.org/1549693002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp File third_party/WebKit/Source/core/layout/LayoutTableCell.cpp (right): https://codereview.chromium.org/1549693002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp#newcode931 third_party/WebKit/Source/core/layout/LayoutTableCell.cpp:931: if (!newValues.startBorder.isVisible() && !newValues.endBorder.isVisible() && !newValues.beforeBorder.isVisible() && !newValues.afterBorder.isVisible()) { ...
4 years, 11 months ago (2016-01-08 17:50:45 UTC) #4
Xianzhu
Stat showed the following results about collapsed borders on top 10k sites (https://docs.google.com/spreadsheets/d/1i_kqo71EAiqyphgDFKwRThH7Oq69MWHncH-lSLwCWgY/edit#gid=0): - 5.74% ...
4 years, 11 months ago (2016-01-10 19:21:23 UTC) #5
Julien - ping for review
https://codereview.chromium.org/1549693002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp File third_party/WebKit/Source/core/layout/LayoutTableCell.cpp (right): https://codereview.chromium.org/1549693002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp#newcode931 third_party/WebKit/Source/core/layout/LayoutTableCell.cpp:931: if (!newValues.startBorder.isVisible() && !newValues.endBorder.isVisible() && !newValues.beforeBorder.isVisible() && !newValues.afterBorder.isVisible()) { ...
4 years, 11 months ago (2016-01-11 18:11:37 UTC) #6
chrishtr
What's going on with this CL?
4 years, 10 months ago (2016-01-28 19:00:11 UTC) #8
Xianzhu
On 2016/01/28 19:00:11, chrishtr wrote: > What's going on with this CL? This CL was ...
4 years, 10 months ago (2016-01-28 19:26:50 UTC) #10
Xianzhu
Uploaded rebased patch. Ptal.
4 years, 10 months ago (2016-01-28 19:36:51 UTC) #11
chrishtr
Is this CL still relevant? I think it fell through the cracks..
4 years, 7 months ago (2016-05-03 16:11:09 UTC) #12
Xianzhu
On 2016/05/03 16:11:09, chrishtr wrote: > Is this CL still relevant? I think it fell ...
4 years, 7 months ago (2016-05-03 16:25:15 UTC) #13
Xianzhu
It's ready for review now. Ptal. https://codereview.chromium.org/1549693002/diff/160001/third_party/WebKit/Source/core/style/CollapsedBorderValue.h File third_party/WebKit/Source/core/style/CollapsedBorderValue.h (right): https://codereview.chromium.org/1549693002/diff/160001/third_party/WebKit/Source/core/style/CollapsedBorderValue.h#newcode71 third_party/WebKit/Source/core/style/CollapsedBorderValue.h:71: return true; Previously ...
4 years, 7 months ago (2016-05-03 19:03:27 UTC) #14
chrishtr
https://codereview.chromium.org/1549693002/diff/160001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp File third_party/WebKit/Source/core/layout/LayoutTableCell.cpp (left): https://codereview.chromium.org/1549693002/diff/160001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp#oldcode922 third_party/WebKit/Source/core/layout/LayoutTableCell.cpp:922: // FIXME: Need a way to invalidate/repaint the borders ...
4 years, 7 months ago (2016-05-04 23:24:19 UTC) #15
Xianzhu
https://codereview.chromium.org/1549693002/diff/160001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp File third_party/WebKit/Source/core/layout/LayoutTableCell.cpp (left): https://codereview.chromium.org/1549693002/diff/160001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp#oldcode922 third_party/WebKit/Source/core/layout/LayoutTableCell.cpp:922: // FIXME: Need a way to invalidate/repaint the borders ...
4 years, 7 months ago (2016-05-05 00:15:51 UTC) #16
chrishtr
https://codereview.chromium.org/1549693002/diff/180001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp File third_party/WebKit/Source/core/layout/LayoutTableCell.cpp (left): https://codereview.chromium.org/1549693002/diff/180001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp#oldcode921 third_party/WebKit/Source/core/layout/LayoutTableCell.cpp:921: // In slimming paint mode, we need to invalidate ...
4 years, 7 months ago (2016-05-05 15:31:36 UTC) #17
Xianzhu
https://codereview.chromium.org/1549693002/diff/180001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp File third_party/WebKit/Source/core/layout/LayoutTableCell.cpp (left): https://codereview.chromium.org/1549693002/diff/180001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp#oldcode921 third_party/WebKit/Source/core/layout/LayoutTableCell.cpp:921: // In slimming paint mode, we need to invalidate ...
4 years, 7 months ago (2016-05-05 17:38:49 UTC) #18
chrishtr
lgtm Looks good modulo the comment below. https://codereview.chromium.org/1549693002/diff/180001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp File third_party/WebKit/Source/core/layout/LayoutTableCell.cpp (right): https://codereview.chromium.org/1549693002/diff/180001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp#newcode926 third_party/WebKit/Source/core/layout/LayoutTableCell.cpp:926: changed = ...
4 years, 7 months ago (2016-05-05 17:42:12 UTC) #19
Xianzhu
https://codereview.chromium.org/1549693002/diff/180001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp File third_party/WebKit/Source/core/layout/LayoutTableCell.cpp (right): https://codereview.chromium.org/1549693002/diff/180001/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp#newcode926 third_party/WebKit/Source/core/layout/LayoutTableCell.cpp:926: changed = !m_collapsedBorderValues->startBorder.visuallyEquals(newValues.startBorder) On 2016/05/05 17:42:12, chrishtr wrote: > ...
4 years, 7 months ago (2016-05-05 17:45:15 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1549693002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1549693002/200001
4 years, 7 months ago (2016-05-05 17:46:09 UTC) #23
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 7 months ago (2016-05-05 19:26:28 UTC) #25
commit-bot: I haz the power
4 years, 7 months ago (2016-05-05 19:28:18 UTC) #27
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/e2e24217bf6051b94756337f8d8cd183ffbebd30
Cr-Commit-Position: refs/heads/master@{#391867}

Powered by Google App Engine
This is Rietveld 408576698