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

Issue 1193433004: Blink-side contiguous allocation of display items. (Closed)

Created:
5 years, 6 months ago by pdr.
Modified:
5 years, 5 months ago
CC:
blink-reviews, blink-reviews-paint_chromium.org, blink-reviews-rendering, Rik, danakj, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, f(malita), fs, gyuyoung2, jchaffraix+rendering, Justin Novosad, kouhei+svg_chromium.org, leviw+renderwatch, pdr+graphicswatchlist_chromium.org, pdr+svgwatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, rwlbuis, Stephen Chennney, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Implement blink-side contiguous allocation of display items. This patch removes heap allocation of display items using ListContainer, an in-place vector of DisplayItems (and subclasses). This patch is inspired by both danakj's https://codereview.chromium.org/1123983002 and jbroman's https://codereview.chromium.org/1192443003. Major changes: 1) Switch backing of DisplayItemList from the DisplayItems subclass which contained a Vector of OwnPtrs to a ListContainer<DisplayItem>. 2) Remove all DisplayItem::Create functions in favor of calling constructors directly. 3) Switch from ItemHandle::isGone to DisplayItem::isIgnoredFromDisplayList 4) Switch from DisplayItemList::add to DisplayItemList::allocateAndConstruct. An Android cluster telemetry tryjob from patchset 15: https://storage.cloud.google.com/cluster-telemetry/tasks/chromium_perf_runs/pdr-1435537875.2/html/index.html Record time caching disabled: -1.565% Record time construction disabled: -1.634% Record time painting disabled: -6.427% BUG=484943 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198107

Patch Set 1 #

Patch Set 2 : Stack allocate all the things, fix bugs, rewrite clip logic #

Patch Set 3 : Fix early return in createAndAppendIfNeeded, cleanup virtual calls #

Patch Set 4 : Ready for review #

Total comments: 3

Patch Set 5 : Remove DisplayItemClientWrapper, move construction disabled checks into createAndAppendIfNeeded, re… #

Patch Set 6 : Rewrite patch entirely based on ListContainer #

Patch Set 7 : Rebase #

Patch Set 8 : Minor cleanup #

Patch Set 9 : Refactor for performance: Use ListContainer directly, switch from isGone to isIgnoredFromDisplayList #

Patch Set 10 : Speed up BoxClipper, add a ListContainer test #

Patch Set 11 : Fix BoxClipper bug #

Patch Set 12 : Fix assert for verifying the noop begin/pair optimization #

Patch Set 13 : Minor tweaks for review #

Patch Set 14 : Add more ListContainer tests #

Patch Set 15 : Minor tweaks to make reviewing easier #

Total comments: 31

Patch Set 16 : Rebase from space and address reviewer comments #

Patch Set 17 : Remove ListContainer::operatorAt[] #

Total comments: 5

Patch Set 18 : Add ListContainer::AllocateAndConstructWithArguments and a TODO in DisplayItemList::findMatchingIte… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+291 lines, -610 lines) Patch
M Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +6 lines, -6 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGResourceClipper.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M Source/core/paint/BoxClipper.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +4 lines, -5 lines 0 comments Download
M Source/core/paint/CompositingRecorder.cpp View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/paint/DisplayItemListPaintTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/paint/FilterPainter.cpp View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -9 lines 0 comments Download
M Source/core/paint/FloatClipRecorder.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/paint/LayerClipRecorder.cpp View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -7 lines 0 comments Download
M Source/core/paint/LayerClipRecorderTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/paint/LayerFixedPositionRecorder.cpp View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/paint/LayoutObjectDrawingRecorderTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +11 lines, -11 lines 0 comments Download
M Source/core/paint/RoundedInnerRectClipper.cpp View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/paint/SVGClipPainter.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M Source/core/paint/SVGMaskPainter.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/paint/ScrollRecorder.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/paint/SubtreeRecorder.cpp View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/paint/Transform3DRecorder.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/paint/TransformRecorder.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/platform/blink_platform.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -2 lines 0 comments Download
M Source/platform/graphics/ListContainer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +23 lines, -7 lines 0 comments Download
M Source/platform/graphics/ListContainerTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +35 lines, -0 lines 0 comments Download
M Source/platform/graphics/paint/CachedDisplayItem.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -7 lines 0 comments Download
M Source/platform/graphics/paint/ClipDisplayItem.h View 1 2 3 4 5 6 7 8 2 chunks +1 line, -13 lines 0 comments Download
M Source/platform/graphics/paint/ClipPathDisplayItem.h View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -12 lines 0 comments Download
M Source/platform/graphics/paint/ClipPathRecorder.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/platform/graphics/paint/ClipRecorder.cpp View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -4 lines 0 comments Download
M Source/platform/graphics/paint/CompositingDisplayItem.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -16 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItem.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +27 lines, -7 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItem.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -0 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItemList.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +29 lines, -5 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItemList.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 20 chunks +53 lines, -53 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItemListTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 9 chunks +23 lines, -23 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItemTransformTreeBuilderTest.cpp View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -5 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItems.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -164 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItems.cpp View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -50 lines 0 comments Download
M Source/platform/graphics/paint/DrawingDisplayItem.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -20 lines 0 comments Download
M Source/platform/graphics/paint/DrawingRecorder.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -3 lines 0 comments Download
M Source/platform/graphics/paint/FilterDisplayItem.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -19 lines 0 comments Download
M Source/platform/graphics/paint/FilterDisplayItem.cpp View 1 2 3 4 1 chunk +0 lines, -15 lines 0 comments Download
M Source/platform/graphics/paint/FixedPositionContainerDisplayItem.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -21 lines 0 comments Download
M Source/platform/graphics/paint/FixedPositionDisplayItem.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -18 lines 0 comments Download
M Source/platform/graphics/paint/FloatClipDisplayItem.h View 1 2 3 4 5 6 7 8 2 chunks +1 line, -13 lines 0 comments Download
M Source/platform/graphics/paint/ScrollDisplayItem.h View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -12 lines 0 comments Download
M Source/platform/graphics/paint/SubtreeDisplayItem.h View 1 2 3 4 5 6 7 8 3 chunks +0 lines, -21 lines 0 comments Download
M Source/platform/graphics/paint/Transform3DDisplayItem.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -14 lines 0 comments Download
M Source/platform/graphics/paint/TransformDisplayItem.h View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -12 lines 0 comments Download

Messages

Total messages: 24 (4 generated)
pdr.
5 years, 6 months ago (2015-06-19 07:09:15 UTC) #2
Xianzhu
https://codereview.chromium.org/1193433004/diff/60001/Source/platform/graphics/paint/DisplayItem.h File Source/platform/graphics/paint/DisplayItem.h (right): https://codereview.chromium.org/1193433004/diff/60001/Source/platform/graphics/paint/DisplayItem.h#newcode363 Source/platform/graphics/paint/DisplayItem.h:363: class DisplayItemClientWrapperHelper { I think we can just use ...
5 years, 6 months ago (2015-06-19 16:19:11 UTC) #3
chrishtr
The patch looks good outside of the DisplayItems code.
5 years, 6 months ago (2015-06-19 18:32:37 UTC) #4
pdr.
Over the past week I've rewritten this patch and I think it's ready for review ...
5 years, 5 months ago (2015-06-29 00:37:51 UTC) #5
chrishtr
lgtm https://codereview.chromium.org/1193433004/diff/280001/Source/platform/graphics/ListContainerTest.cpp File Source/platform/graphics/ListContainerTest.cpp (right): https://codereview.chromium.org/1193433004/diff/280001/Source/platform/graphics/ListContainerTest.cpp#newcode889 Source/platform/graphics/ListContainerTest.cpp:889: EXPECT_EQ(list1.back(), movedElement2); Assert the pointers are not equal. ...
5 years, 5 months ago (2015-06-29 17:19:16 UTC) #6
danakj
https://codereview.chromium.org/1193433004/diff/280001/Source/core/paint/BoxClipper.cpp File Source/core/paint/BoxClipper.cpp (right): https://codereview.chromium.org/1193433004/diff/280001/Source/core/paint/BoxClipper.cpp#newcode78 Source/core/paint/BoxClipper.cpp:78: if (m_clipType == DisplayItem::UninitializedType) now the assert below will ...
5 years, 5 months ago (2015-06-29 17:43:52 UTC) #8
jbroman
https://codereview.chromium.org/1193433004/diff/280001/Source/core/layout/LayoutBox.h File Source/core/layout/LayoutBox.h (right): https://codereview.chromium.org/1193433004/diff/280001/Source/core/layout/LayoutBox.h#newcode583 Source/core/layout/LayoutBox.h:583: virtual LayoutRect overflowClipRect(const LayoutPoint& location, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize) const; ...
5 years, 5 months ago (2015-06-29 18:11:56 UTC) #9
danakj
https://codereview.chromium.org/1193433004/diff/280001/Source/platform/graphics/paint/DisplayItemList.h File Source/platform/graphics/paint/DisplayItemList.h (right): https://codereview.chromium.org/1193433004/diff/280001/Source/platform/graphics/paint/DisplayItemList.h#newcode24 Source/platform/graphics/paint/DisplayItemList.h:24: static const size_t kMaximumDisplayItemSize = sizeof(BeginTransform3DDisplayItem); On 2015/06/29 18:11:56, ...
5 years, 5 months ago (2015-06-29 18:15:29 UTC) #10
jbroman
On 2015/06/29 18:15:29, danakj OOO back june 28 wrote: > https://codereview.chromium.org/1193433004/diff/280001/Source/platform/graphics/paint/DisplayItemList.h > File Source/platform/graphics/paint/DisplayItemList.h (right): ...
5 years, 5 months ago (2015-06-29 18:32:38 UTC) #11
danakj
On Mon, Jun 29, 2015 at 11:32 AM, <jbroman@chromium.org> wrote: > On 2015/06/29 18:15:29, danakj ...
5 years, 5 months ago (2015-06-29 18:45:40 UTC) #12
pdr.
Thanks for the reviews! PTAL https://codereview.chromium.org/1193433004/diff/280001/Source/core/layout/LayoutBox.h File Source/core/layout/LayoutBox.h (right): https://codereview.chromium.org/1193433004/diff/280001/Source/core/layout/LayoutBox.h#newcode583 Source/core/layout/LayoutBox.h:583: virtual LayoutRect overflowClipRect(const LayoutPoint& ...
5 years, 5 months ago (2015-06-29 22:20:03 UTC) #13
danakj
https://codereview.chromium.org/1193433004/diff/280001/Source/platform/graphics/ListContainer.h File Source/platform/graphics/ListContainer.h (right): https://codereview.chromium.org/1193433004/diff/280001/Source/platform/graphics/ListContainer.h#newcode255 Source/platform/graphics/ListContainer.h:255: BaseElementType& operator[](size_t index) On 2015/06/29 22:20:03, pdr wrote: > ...
5 years, 5 months ago (2015-06-29 22:29:47 UTC) #14
pdr.
On 2015/06/29 at 22:29:47, danakj wrote: > https://codereview.chromium.org/1193433004/diff/280001/Source/platform/graphics/ListContainer.h > File Source/platform/graphics/ListContainer.h (right): > > https://codereview.chromium.org/1193433004/diff/280001/Source/platform/graphics/ListContainer.h#newcode255 ...
5 years, 5 months ago (2015-06-29 22:59:42 UTC) #15
jbroman
lgtm; this seems reasonable (if danakj agrees) https://codereview.chromium.org/1193433004/diff/280001/Source/platform/graphics/paint/DisplayItemList.h File Source/platform/graphics/paint/DisplayItemList.h (right): https://codereview.chromium.org/1193433004/diff/280001/Source/platform/graphics/paint/DisplayItemList.h#newcode24 Source/platform/graphics/paint/DisplayItemList.h:24: static const ...
5 years, 5 months ago (2015-06-30 14:40:50 UTC) #16
danakj
LGTM but https://codereview.chromium.org/1193433004/diff/320001/Source/platform/graphics/ListContainer.h File Source/platform/graphics/ListContainer.h (right): https://codereview.chromium.org/1193433004/diff/320001/Source/platform/graphics/ListContainer.h#newcode260 Source/platform/graphics/ListContainer.h:260: return new (allocate(sizeof(DerivedElementType))) DerivedElementType(WTF::forward<Args>(args)...); Can you add ...
5 years, 5 months ago (2015-06-30 18:49:01 UTC) #17
jbroman
https://codereview.chromium.org/1193433004/diff/320001/Source/platform/graphics/paint/DisplayItemList.cpp File Source/platform/graphics/paint/DisplayItemList.cpp (right): https://codereview.chromium.org/1193433004/diff/320001/Source/platform/graphics/paint/DisplayItemList.cpp#newcode157 Source/platform/graphics/paint/DisplayItemList.cpp:157: const DisplayItem& existingItem = *list.elementAt(index); On 2015/06/30 18:49:01, danakj ...
5 years, 5 months ago (2015-06-30 18:59:17 UTC) #18
danakj
On Tue, Jun 30, 2015 at 11:59 AM, <jbroman@chromium.org> wrote: > > > https://codereview.chromium.org/1193433004/diff/320001/Source/platform/graphics/paint/DisplayItemList.cpp > ...
5 years, 5 months ago (2015-06-30 19:00:44 UTC) #19
pdr.
Thanks for the detailed reviews of this big patch. Reviewing these isn't much fun... Off ...
5 years, 5 months ago (2015-06-30 22:16:06 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1193433004/340001
5 years, 5 months ago (2015-06-30 22:16:36 UTC) #23
commit-bot: I haz the power
5 years, 5 months ago (2015-06-30 23:26:21 UTC) #24
Message was sent while issue was closed.
Committed patchset #18 (id:340001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=198107

Powered by Google App Engine
This is Rietveld 408576698