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

Issue 264183002: RAL: Eliminate n^2 walk to find repaint containers (Closed)

Created:
6 years, 7 months ago by leviw_travelin_and_unemployed
Modified:
6 years, 7 months ago
CC:
blink-reviews, blink-reviews-rendering, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, blink-layers+watch_chromium.org, jchaffraix+rendering, pdr., rune+blink, ojan
Visibility:
Public.

Description

RAL: Eliminate n^2 walk to find repaint containers Instead of walking up from every renderer to find the containerForRepaint, pass the current repaint container along through repaintTreeAfterLayout and update it when we pass through a renderer that's a repaint container. This patch also introduces an isRepaintContainer function. This is guaranteed to be able to be a repaint container, but due to filters and regions, isn't guaranteed to be the repaint container for non-composited descendant renderers. The magic logic to handle these special cases has been moved to an adjustCompositedContainerForSpecialAncestors function, which has been split out of containerForRepaint. This patch also adds a switch in RenderBox to avoid unnecessarily mallocing LayoutStates when we know our repaint container isn't the view. BUG=320139 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174197

Patch Set 1 #

Patch Set 2 : Add FIXME #

Patch Set 3 : Rebase #

Patch Set 4 : Fix the build, too :p #

Patch Set 5 : Rebase again after Dan's patch #

Patch Set 6 : Fix for SVG #

Total comments: 14

Patch Set 7 : Updated to ToT and with some name changes in RenderBlock #

Patch Set 8 : Adding (improved!) test expectations and removing an unnecessary container call #

Patch Set 9 : With needsRebaseline for other platforms #

Patch Set 10 : With less asserts :( #

Total comments: 2

Patch Set 11 : Fixing enableLayoutState call #

Patch Set 12 : ToT-ed #

Patch Set 13 : One more test expectation update :-/ #

Patch Set 14 : One more simple rebaseline... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -50 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M LayoutTests/platform/mac/fast/repaint/reflection-repaint-test-expected.txt View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderBlock.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderBlock.cpp View 1 2 3 4 5 6 7 1 chunk +12 lines, -9 lines 0 comments Download
M Source/core/rendering/RenderBox.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderBox.cpp View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +21 lines, -11 lines 0 comments Download
M Source/core/rendering/RenderLayer.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/rendering/RenderLayer.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderListBox.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderListBox.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderObject.h View 1 2 3 4 5 6 2 chunks +4 lines, -1 line 0 comments Download
M Source/core/rendering/RenderObject.cpp View 1 2 3 4 5 6 7 8 9 5 chunks +22 lines, -8 lines 0 comments Download
M Source/core/rendering/RenderView.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGBlock.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGBlock.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGModelObject.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGModelObject.cpp View 1 2 3 4 5 6 3 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
leviw_travelin_and_unemployed
ptal
6 years, 7 months ago (2014-05-06 18:23:24 UTC) #1
Julien - ping for review
lgtm but let's add a lot of missing 'const'. +Vollick: For the composited + positioned ...
6 years, 7 months ago (2014-05-07 17:50:03 UTC) #2
Julien - ping for review
+Vollick for real
6 years, 7 months ago (2014-05-07 17:50:19 UTC) #3
leviw_travelin_and_unemployed
Thanks for the review! https://codereview.chromium.org/264183002/diff/70001/Source/core/rendering/RenderBlock.cpp File Source/core/rendering/RenderBlock.cpp (right): https://codereview.chromium.org/264183002/diff/70001/Source/core/rendering/RenderBlock.cpp#newcode377 Source/core/rendering/RenderBlock.cpp:377: RenderLayerModelObject* repaintContainerForChild = (*it)->containerForRepaint(); On ...
6 years, 7 months ago (2014-05-07 17:58:48 UTC) #4
Ian Vollick
https://codereview.chromium.org/264183002/diff/70001/Source/core/rendering/RenderBlock.cpp File Source/core/rendering/RenderBlock.cpp (right): https://codereview.chromium.org/264183002/diff/70001/Source/core/rendering/RenderBlock.cpp#newcode377 Source/core/rendering/RenderBlock.cpp:377: RenderLayerModelObject* repaintContainerForChild = (*it)->containerForRepaint(); On 2014/05/07 17:58:48, leviw wrote: ...
6 years, 7 months ago (2014-05-07 22:55:57 UTC) #5
eseidel
https://codereview.chromium.org/264183002/diff/70001/Source/core/rendering/RenderBlock.cpp File Source/core/rendering/RenderBlock.cpp (right): https://codereview.chromium.org/264183002/diff/70001/Source/core/rendering/RenderBlock.cpp#newcode377 Source/core/rendering/RenderBlock.cpp:377: RenderLayerModelObject* repaintContainerForChild = (*it)->containerForRepaint(); I'm not sure it is ...
6 years, 7 months ago (2014-05-08 00:43:01 UTC) #6
leviw_travelin_and_unemployed
On 2014/05/08 00:43:01, eseidel wrote: > https://codereview.chromium.org/264183002/diff/70001/Source/core/rendering/RenderBlock.cpp > File Source/core/rendering/RenderBlock.cpp (right): > > https://codereview.chromium.org/264183002/diff/70001/Source/core/rendering/RenderBlock.cpp#newcode377 > ...
6 years, 7 months ago (2014-05-08 01:28:27 UTC) #7
ojan
https://codereview.chromium.org/264183002/diff/70001/Source/core/rendering/RenderBlock.cpp File Source/core/rendering/RenderBlock.cpp (right): https://codereview.chromium.org/264183002/diff/70001/Source/core/rendering/RenderBlock.cpp#newcode377 Source/core/rendering/RenderBlock.cpp:377: RenderLayerModelObject* repaintContainerForChild = (*it)->containerForRepaint(); In theory, all the positioned ...
6 years, 7 months ago (2014-05-10 17:43:12 UTC) #8
ojan
https://codereview.chromium.org/264183002/diff/70001/Source/core/rendering/RenderBlock.cpp File Source/core/rendering/RenderBlock.cpp (right): https://codereview.chromium.org/264183002/diff/70001/Source/core/rendering/RenderBlock.cpp#newcode377 Source/core/rendering/RenderBlock.cpp:377: RenderLayerModelObject* repaintContainerForChild = (*it)->containerForRepaint(); On 2014/05/10 17:43:12, ojan wrote: ...
6 years, 7 months ago (2014-05-10 18:02:30 UTC) #9
leviw_travelin_and_unemployed
PTAL if you can. I've made a few cosmetic changes (including fixing the const issues).
6 years, 7 months ago (2014-05-13 13:31:00 UTC) #10
leviw_travelin_and_unemployed
D'oh... There's another ASSERT that needs to be disabled (in RenderObject::positionFromRepaintContainer).
6 years, 7 months ago (2014-05-13 13:35:37 UTC) #11
leviw_travelin_and_unemployed
On 2014/05/13 13:35:37, leviw wrote: > D'oh... There's another ASSERT that needs to be disabled ...
6 years, 7 months ago (2014-05-13 15:33:00 UTC) #12
Julien - ping for review
lgtm https://codereview.chromium.org/264183002/diff/150001/Source/core/rendering/RenderBlock.cpp File Source/core/rendering/RenderBlock.cpp (right): https://codereview.chromium.org/264183002/diff/150001/Source/core/rendering/RenderBlock.cpp#newcode379 Source/core/rendering/RenderBlock.cpp:379: const RenderLayerModelObject& repaintContainerForChild = *box->containerForRepaint(); I don't think ...
6 years, 7 months ago (2014-05-16 10:21:05 UTC) #13
leviw_travelin_and_unemployed
The CQ bit was checked by leviw@chromium.org
6 years, 7 months ago (2014-05-16 13:39:03 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leviw@chromium.org/264183002/190001
6 years, 7 months ago (2014-05-16 13:39:34 UTC) #15
leviw_travelin_and_unemployed
The CQ bit was checked by leviw@chromium.org
6 years, 7 months ago (2014-05-16 14:05:45 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leviw@chromium.org/264183002/210001
6 years, 7 months ago (2014-05-16 14:05:56 UTC) #17
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-16 15:38:10 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-16 16:23:57 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/7399)
6 years, 7 months ago (2014-05-16 16:23:57 UTC) #20
leviw_travelin_and_unemployed
The CQ bit was checked by leviw@chromium.org
6 years, 7 months ago (2014-05-16 16:45:06 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leviw@chromium.org/264183002/230001
6 years, 7 months ago (2014-05-16 16:45:56 UTC) #22
commit-bot: I haz the power
6 years, 7 months ago (2014-05-16 18:15:46 UTC) #23
Message was sent while issue was closed.
Change committed as 174197

Powered by Google App Engine
This is Rietveld 408576698