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

Issue 2119033003: Fix alignment issue of ContiguousContainer (Closed)

Created:
4 years, 5 months ago by Xianzhu
Modified:
4 years, 5 months ago
Reviewers:
pdr., jbroman
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-paint_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), Justin Novosad, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix alignment issue of ContiguousContainer - Fix crbug.com/625381 that alignment is missing during ContiguousContainer::appendByMoving(); - Allow mixed alignment of objects to make them more compacted in the buffer BUG=625381 TEST=ContiguousContainerTest.Alignment CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Patch Set 1 #

Patch Set 2 : Fix alignment issue of ContiguousContainer #

Patch Set 3 : Rebase #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+413 lines, -223 lines) Patch
M cc/base/contiguous_container.h View 1 7 chunks +43 lines, -25 lines 0 comments Download
M cc/base/contiguous_container.cc View 1 3 chunks +46 lines, -22 lines 0 comments Download
M cc/base/contiguous_container_unittest.cc View 1 18 chunks +86 lines, -31 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ContiguousContainer.h View 1 6 chunks +32 lines, -25 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp View 1 4 chunks +42 lines, -25 lines 2 comments Download
M third_party/WebKit/Source/platform/graphics/ContiguousContainerTest.cpp View 1 18 chunks +83 lines, -30 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/CachedDisplayItem.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/ClipDisplayItem.h View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/ClipPathDisplayItem.h View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/CompositingDisplayItem.h View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h View 1 7 chunks +32 lines, -12 lines 2 comments Download
M third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h View 1 chunk +1 line, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.h View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/FloatClipDisplayItem.h View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/ForeignLayerDisplayItem.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/ForeignLayerDisplayItem.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/ScrollDisplayItem.h View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/SubsequenceDisplayItem.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/Transform3DDisplayItem.h View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/TransformDisplayItem.h View 2 chunks +4 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 8 (3 generated)
Xianzhu
https://codereview.chromium.org/2122573002/ is a much simpler change, but it causes 2% regression of viewport_picture_size in rasterize_and_record_micro ...
4 years, 5 months ago (2016-07-04 16:31:56 UTC) #4
jbroman
Hmm, I'm interested to see if those speed differences are reliable. I'm not convinced this ...
4 years, 5 months ago (2016-07-04 19:21:28 UTC) #5
jbroman
https://codereview.chromium.org/2119033003/diff/40001/third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp File third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp (right): https://codereview.chromium.org/2119033003/diff/40001/third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp#newcode24 third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp:24: (((reinterpret_cast<size_t>(address) - 1) >> log2Alignment) + 1) << log2Alignment); ...
4 years, 5 months ago (2016-07-04 19:21:35 UTC) #6
Xianzhu
On 2016/07/04 19:21:28, jbroman wrote: > Hmm, I'm interested to see if those speed differences ...
4 years, 5 months ago (2016-07-04 19:30:23 UTC) #7
Xianzhu
4 years, 5 months ago (2016-07-05 04:24:58 UTC) #8
Message was sent while issue was closed.
On 2016/07/04 19:30:23, Xianzhu wrote:
> On 2016/07/04 19:21:28, jbroman wrote:
> > Hmm, I'm interested to see if those speed differences are reliable.
> > 
> > I'm not convinced this complexity is worth the 2% size, especially since I'd
> > expect that to go away with SPv2, which doesn't use
> BeginTransform3DDisplayItem
> > (and hence would allow us to go to pointer alignment, which should be
> perfect).
> > 
> > On 2016/07/04 at 16:31:56, wangxianzhu wrote:
> > > https://codereview.chromium.org/2122573002/ is a much simpler change, but
it
> > causes 2% regression of viewport_picture_size in rasterize_and_record_micro
> > tests (http://ct.skia.org chromium run 1043). I think the measurement
without
> patch
> > happened to be taken when the DisplayItemList contained many copied by
moving
> > items which are smaller than the items created directly, and with the patch
> they
> > are of the same size.
> > > 
> > > With this CL, there was no regression of viewport_picture_size
> (http://ct.skia.org
> > chromium run 1042). There were also progressions of
> record_time_caching_disabled
> > and record_time_construction_disabled. Don't know exactly why. Rerunning the
> > test to see if there was flakiness.
> > > 
> > > I also wonder if we can combine the versions of ContiguousContainer in cc
> and
> > blink.
> > 
> > It's non-trivial, because Blink probably wants to use partition alloc but cc
> > cannot, etc. This is bug 580224, but there doesn't seem to be an obvious
> > solution that doesn't involve a fairly large amount of magic to abstract the
> > differences (templating on the allocator, etc).
> 
> Thanks for the reply. Now I think we should go though the simpler way.
> Abandoning this CL.

Another run (1046) also showed progression of this CL. Guessed the cause might
be about more compact data but run 1047 proved not. It might be worth
investigating the cause.

Powered by Google App Engine
This is Rietveld 408576698