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

Issue 1315993004: Implement a paint offset cache for slimming paint v2 (Closed)

Created:
5 years, 3 months ago by pdr.
Modified:
5 years, 3 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), jbroman, jchaffraix+rendering, Justin Novosad, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+graphicswatchlist_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/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

Implement a paint offset cache for slimming paint v2 This patch implements paint offset cache as described in: https://docs.google.com/document/d/1oY8P7a7G4W2LYOvT3VyqUNKOOek6S_e-jD2XjM_7g9U/view This patch is large but only a few new concepts have been added: 1) A LayoutPoint for paint offset is now passed into all layout drawing recorders. 2) The display item list temporarily stores the previous paint offsets. These will be moved onto the LayoutObject themselves once https://codereview.chromium.org/1315213002 lands. 3) If a new paint offset is detected during paint, the recorded offset is updated and the layout object is marked as invalid in the display list. 4) Asserts have been added that paint offsets do not change between phases. DisplayItemList::m_clientsWithPaintOffsetInvalidations checks for emitting cached display items after the paint offset was invalidated. DisplayItemList::invalidatePaintOffset checks for existing non-cached display items added before the paint offset was invalidated. BUG=508383 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201589

Patch Set 1 #

Total comments: 7

Patch Set 2 : Painful rebase #

Patch Set 3 : Address reviewer comments, also move the stored paint offsets to DisplayItemList temporarily #

Patch Set 4 : Fix those embarrassing bugs that only pop up after a patchset is uploaded #

Patch Set 5 : Fix bugs caught by unittest failures #

Total comments: 2

Patch Set 6 : paintOffsetWasRecorded -> paintOffsetIsUnchanged #

Patch Set 7 : Rebase #

Total comments: 1

Patch Set 8 : Rebase #

Patch Set 9 : Rebase more (world moved in the past hour) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -112 lines) Patch
M Source/core/layout/LayoutTextControlSingleLine.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/paint/BlockFlowPainter.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/BlockPainter.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/BoxPainter.cpp View 1 3 chunks +6 lines, -6 lines 0 comments Download
M Source/core/paint/DetailsMarkerPainter.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/paint/EmbeddedObjectPainter.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/FieldsetPainter.cpp View 1 4 chunks +4 lines, -4 lines 0 comments Download
M Source/core/paint/FileUploadControlPainter.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/paint/FramePainter.cpp View 1 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/paint/FrameSetPainter.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/HTMLCanvasPainter.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/paint/ImagePainter.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/core/paint/ImagePainter.cpp View 1 2 3 4 5 6 7 4 chunks +8 lines, -8 lines 0 comments Download
M Source/core/paint/LayerClipRecorderTest.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/LayoutObjectDrawingRecorder.h View 1 2 3 4 5 6 2 chunks +27 lines, -12 lines 0 comments Download
M Source/core/paint/LayoutObjectDrawingRecorderTest.cpp View 1 2 3 4 5 6 7 8 3 chunks +84 lines, -5 lines 0 comments Download
M Source/core/paint/ListMarkerPainter.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/paint/MultiColumnSetPainter.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/ObjectPainter.cpp View 1 2 3 4 5 6 7 3 chunks +4 lines, -4 lines 0 comments Download
M Source/core/paint/PartPainter.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/ReplacedPainter.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/SVGClipPainter.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/SVGFilterPainter.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/SVGImagePainter.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/SVGMaskPainter.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/SVGRootInlineBoxPainter.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/SVGShapePainter.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/ScrollableAreaPainter.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/paint/TableCellPainter.cpp View 1 3 chunks +6 lines, -6 lines 0 comments Download
M Source/core/paint/TablePainter.cpp View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M Source/core/paint/TableRowPainter.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/TableSectionPainter.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/VideoPainter.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/ViewPainter.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItemList.h View 1 2 3 4 5 6 7 8 6 chunks +31 lines, -0 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItemList.cpp View 1 2 3 4 5 6 7 8 5 chunks +78 lines, -5 lines 0 comments Download
M Source/platform/graphics/paint/DrawingRecorder.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M Source/web/WebPluginContainerImpl.cpp View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 21 (5 generated)
pdr.
Ready for an initial review
5 years, 3 months ago (2015-08-27 01:43:19 UTC) #2
Xianzhu
https://codereview.chromium.org/1315993004/diff/1/Source/core/layout/LayoutObject.h File Source/core/layout/LayoutObject.h (right): https://codereview.chromium.org/1315993004/diff/1/Source/core/layout/LayoutObject.h#newcode1438 Source/core/layout/LayoutObject.h:1438: mutable LayoutPoint m_cachedPaintOffset; Would m_previousPaintOffset be better, as we ...
5 years, 3 months ago (2015-08-27 17:20:10 UTC) #3
Stephen Chennney
https://codereview.chromium.org/1315993004/diff/1/Source/platform/graphics/paint/DisplayItemList.cpp File Source/platform/graphics/paint/DisplayItemList.cpp (right): https://codereview.chromium.org/1315993004/diff/1/Source/platform/graphics/paint/DisplayItemList.cpp#newcode146 Source/platform/graphics/paint/DisplayItemList.cpp:146: m_validlyCachedClients.remove(client); My understanding was that the SkPicture did not ...
5 years, 3 months ago (2015-08-27 17:25:41 UTC) #5
pdr.
Updated! PTAL The big changes in the latest patchset are to move the previous paint ...
5 years, 3 months ago (2015-08-28 03:31:41 UTC) #6
Xianzhu
https://codereview.chromium.org/1315993004/diff/1/Source/core/paint/BlockFlowPainter.cpp File Source/core/paint/BlockFlowPainter.cpp (right): https://codereview.chromium.org/1315993004/diff/1/Source/core/paint/BlockFlowPainter.cpp#newcode67 Source/core/paint/BlockFlowPainter.cpp:67: bool skipRecording = LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutBlockFlow, DisplayItem::SelectionGap, paintOffset); On 2015/08/28 ...
5 years, 3 months ago (2015-08-28 03:59:00 UTC) #7
pdr.
On 2015/08/28 at 03:59:00, wangxianzhu wrote: > https://codereview.chromium.org/1315993004/diff/1/Source/core/paint/BlockFlowPainter.cpp > File Source/core/paint/BlockFlowPainter.cpp (right): > > https://codereview.chromium.org/1315993004/diff/1/Source/core/paint/BlockFlowPainter.cpp#newcode67 ...
5 years, 3 months ago (2015-08-28 04:34:01 UTC) #8
Xianzhu
On 2015/08/28 04:34:01, pdr wrote: > On 2015/08/28 at 03:59:00, wangxianzhu wrote: > > > ...
5 years, 3 months ago (2015-08-28 16:18:26 UTC) #9
chrishtr
https://codereview.chromium.org/1315993004/diff/80001/Source/platform/graphics/paint/DisplayItemList.cpp File Source/platform/graphics/paint/DisplayItemList.cpp (right): https://codereview.chromium.org/1315993004/diff/80001/Source/platform/graphics/paint/DisplayItemList.cpp#newcode115 Source/platform/graphics/paint/DisplayItemList.cpp:115: void DisplayItemList::invalidate(DisplayItemClient client) Don't you also want to invalidate ...
5 years, 3 months ago (2015-08-28 17:10:47 UTC) #11
pdr.
On 2015/08/28 at 17:10:47, chrishtr wrote: > https://codereview.chromium.org/1315993004/diff/80001/Source/platform/graphics/paint/DisplayItemList.cpp > File Source/platform/graphics/paint/DisplayItemList.cpp (right): > > https://codereview.chromium.org/1315993004/diff/80001/Source/platform/graphics/paint/DisplayItemList.cpp#newcode115 ...
5 years, 3 months ago (2015-08-28 17:37:51 UTC) #12
Xianzhu
I think I found a way to make a small change to removes the usage ...
5 years, 3 months ago (2015-08-28 19:25:39 UTC) #13
Xianzhu
When trying to remove m_previousPositionFromPaintInvalidationBacking dependency for spv2, I encountered linebox paint offset issue which ...
5 years, 3 months ago (2015-08-28 21:09:52 UTC) #14
pdr.
On 2015/08/28 at 19:25:39, wangxianzhu wrote: > I think I found a way to make ...
5 years, 3 months ago (2015-09-01 22:33:26 UTC) #15
Xianzhu
On 2015/09/01 22:33:26, pdr wrote: > On 2015/08/28 at 19:25:39, wangxianzhu wrote: > > I ...
5 years, 3 months ago (2015-09-01 23:04:09 UTC) #16
pdr.
On 2015/09/01 at 23:04:09, wangxianzhu wrote: > On 2015/09/01 22:33:26, pdr wrote: > > On ...
5 years, 3 months ago (2015-09-01 23:05:20 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1315993004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1315993004/160001
5 years, 3 months ago (2015-09-01 23:05:40 UTC) #20
commit-bot: I haz the power
5 years, 3 months ago (2015-09-02 00:58:04 UTC) #21
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=201589

Powered by Google App Engine
This is Rietveld 408576698