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

Issue 1220583004: Refactor DrawingRecorders to check for cached drawings earlier (Closed)

Created:
5 years, 5 months ago by pdr.
Modified:
5 years, 5 months ago
Reviewers:
chrishtr, Xianzhu
CC:
blink-layers+watch_chromium.org, blink-reviews, blink-reviews-paint_chromium.org, blink-reviews-rendering, Rik, danakj, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, f(malita), fs, gyuyoung2, jbroman, jchaffraix+rendering, Justin Novosad, kouhei+svg_chromium.org, leviw+renderwatch, pdr+svgwatchlist_chromium.org, pdr+graphicswatchlist_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

Refactor DrawingRecorders to check for cached drawings earlier This patch refactors the DrawingRecorders to call [LayoutObject]DrawingRecorder::useCachedDrawingIfPossible(...) before creating the recorder which lets us skip expensive cull rect calc. Perf data: -3% record time: https://storage.cloud.google.com/cluster-telemetry/tasks/chromium_perf_runs/pdr-1436182745.58/html/index.html Callsites have been optimized as little as possible to keep this patch reviewable. We may want to create a DrawingRecorderCacheParams struct to avoid copying the parameters (context, client, type) twice at all the callsites. BUG=506662 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198330

Patch Set 1 #

Patch Set 2 : Fix some !'s and &&'s. De Morgan would be proud. #

Total comments: 8

Patch Set 3 : Address reviewer comments #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+337 lines, -318 lines) Patch
M Source/core/layout/LayoutScrollbarTheme.cpp View 1 chunk +4 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutTextControlSingleLine.cpp View 1 2 chunks +4 lines, -2 lines 0 comments Download
M Source/core/paint/BlockFlowPainter.cpp View 1 2 1 chunk +12 lines, -4 lines 0 comments Download
M Source/core/paint/BlockPainter.cpp View 1 chunk +2 lines, -3 lines 0 comments Download
M Source/core/paint/BoxPainter.cpp View 1 3 chunks +9 lines, -7 lines 0 comments Download
M Source/core/paint/DetailsMarkerPainter.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/paint/EllipsisBoxPainter.cpp View 1 chunk +4 lines, -2 lines 0 comments Download
M Source/core/paint/EmbeddedObjectPainter.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/paint/FieldsetPainter.cpp View 4 chunks +6 lines, -6 lines 0 comments Download
M Source/core/paint/FileUploadControlPainter.cpp View 2 chunks +3 lines, -5 lines 0 comments Download
M Source/core/paint/FramePainter.cpp View 2 chunks +4 lines, -6 lines 0 comments Download
M Source/core/paint/FrameSetPainter.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M Source/core/paint/HTMLCanvasPainter.cpp View 2 chunks +2 lines, -3 lines 0 comments Download
M Source/core/paint/ImagePainter.cpp View 1 2 chunks +7 lines, -9 lines 0 comments Download
M Source/core/paint/InlineFlowBoxPainter.cpp View 3 chunks +10 lines, -7 lines 0 comments Download
M Source/core/paint/InlinePainter.cpp View 1 2 chunks +14 lines, -14 lines 0 comments Download
M Source/core/paint/InlineTextBoxPainter.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/LayerClipRecorderTest.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M Source/core/paint/LayoutObjectDrawingRecorder.h View 2 chunks +12 lines, -2 lines 0 comments Download
M Source/core/paint/LayoutObjectDrawingRecorderTest.cpp View 1 chunk +5 lines, -6 lines 0 comments Download
M Source/core/paint/ListMarkerPainter.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/paint/MultiColumnSetPainter.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M Source/core/paint/ObjectPainter.cpp View 2 chunks +5 lines, -4 lines 0 comments Download
M Source/core/paint/PartPainter.cpp View 1 chunk +2 lines, -3 lines 0 comments Download
M Source/core/paint/ReplacedPainter.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M Source/core/paint/SVGClipPainter.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/SVGFilterPainter.cpp View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M Source/core/paint/SVGImagePainter.cpp View 1 chunk +12 lines, -14 lines 0 comments Download
M Source/core/paint/SVGInlineTextBoxPainter.cpp View 1 chunk +9 lines, -10 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 +6 lines, -8 lines 0 comments Download
M Source/core/paint/SVGShapePainter.cpp View 1 chunk +43 lines, -45 lines 0 comments Download
M Source/core/paint/ScrollableAreaPainter.cpp View 2 chunks +5 lines, -4 lines 0 comments Download
M Source/core/paint/TableCellPainter.cpp View 3 chunks +8 lines, -7 lines 0 comments Download
M Source/core/paint/TablePainter.cpp View 1 chunk +4 lines, -2 lines 0 comments Download
M Source/core/paint/TableRowPainter.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M Source/core/paint/TableSectionPainter.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/paint/VideoPainter.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M Source/core/paint/ViewPainter.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/svg/graphics/SVGImage.cpp View 1 2 3 1 chunk +6 lines, -8 lines 0 comments Download
M Source/platform/graphics/GraphicsLayer.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItemListTest.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/platform/graphics/paint/DrawingRecorder.h View 2 chunks +2 lines, -10 lines 0 comments Download
M Source/platform/graphics/paint/DrawingRecorder.cpp View 3 chunks +29 lines, -30 lines 0 comments Download
M Source/platform/scroll/ScrollbarTheme.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/platform/scroll/ScrollbarThemeAura.cpp View 3 chunks +13 lines, -8 lines 0 comments Download
M Source/platform/scroll/ScrollbarThemeMacCommon.mm View 1 chunk +3 lines, -2 lines 0 comments Download
M Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm View 1 chunk +3 lines, -2 lines 0 comments Download
M Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm View 2 chunks +6 lines, -4 lines 0 comments Download
M Source/platform/scroll/ScrollbarThemeMock.cpp View 1 chunk +11 lines, -8 lines 0 comments Download
M Source/platform/scroll/ScrollbarThemeNonMacCommon.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/platform/scroll/ScrollbarThemeOverlay.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M Source/web/PageOverlayTest.cpp View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M Source/web/PageWidgetDelegate.cpp View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M Source/web/WebFontImpl.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebGraphicsContextImpl.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M Source/web/WebLocalFrameImpl.cpp View 1 2 3 1 chunk +8 lines, -11 lines 0 comments Download
M Source/web/WebPluginContainerImpl.cpp View 2 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 13 (3 generated)
pdr.
5 years, 5 months ago (2015-07-03 00:43:57 UTC) #2
Xianzhu
https://codereview.chromium.org/1220583004/diff/20001/Source/core/paint/BlockFlowPainter.cpp File Source/core/paint/BlockFlowPainter.cpp (right): https://codereview.chromium.org/1220583004/diff/20001/Source/core/paint/BlockFlowPainter.cpp#newcode72 Source/core/paint/BlockFlowPainter.cpp:72: // TODO(wkorman): Rework below to process paint invalidation rects ...
5 years, 5 months ago (2015-07-03 01:24:42 UTC) #3
pdr.
Thanks for the review. How do you feel about the DrawingRecorderCacheParams idea? It's a little ...
5 years, 5 months ago (2015-07-03 02:38:05 UTC) #4
Xianzhu
lgtm. On 2015/07/03 02:38:05, pdr wrote: > Thanks for the review. > > How do ...
5 years, 5 months ago (2015-07-03 20:03:21 UTC) #5
pdr.
On 2015/07/03 at 20:03:21, wangxianzhu wrote: > lgtm. > > On 2015/07/03 02:38:05, pdr wrote: ...
5 years, 5 months ago (2015-07-03 21:08:15 UTC) #6
pdr.
On 2015/07/03 at 21:08:15, pdr wrote: > On 2015/07/03 at 20:03:21, wangxianzhu wrote: > > ...
5 years, 5 months ago (2015-07-06 17:29:07 UTC) #7
Xianzhu
On 2015/07/06 17:29:07, pdr wrote: > On 2015/07/03 at 21:08:15, pdr wrote: > > On ...
5 years, 5 months ago (2015-07-06 17:54:17 UTC) #8
pdr.
On 2015/07/06 at 17:54:17, wangxianzhu wrote: > On 2015/07/06 17:29:07, pdr wrote: > > On ...
5 years, 5 months ago (2015-07-06 17:56:19 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1220583004/60001
5 years, 5 months ago (2015-07-06 17:56:32 UTC) #12
commit-bot: I haz the power
5 years, 5 months ago (2015-07-06 19:13:22 UTC) #13
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=198330

Powered by Google App Engine
This is Rietveld 408576698