Chromium Code Reviews
DescriptionEarly-out from the prepaint tree walk
This patch stops the prepaint tree walk when no paint invalidation or
paint property updates are needed.
The three major changes are:
1) PaintPropertyTreeBuilder now detects when properties are added or
removed and forces a paint property update for all descendants. This
is needed because tree structure changes can cause descendant objects
to reference new/different ancestors.
2) When stopping the prepaint tree walk due to throttled frames, paint
invalidation and property update flags are no longer cleared. This
allows subsequent prepaint tree walks to correctly invalidate subframes
when they unthrottle.
3) PrePaintTreeWalk::walk(LayoutObject&...) exits early when possible.
Design doc:
https://docs.google.com/document/d/1_GkBfvameyhnLV7ODIRsOoTedQEG5liAcHwAxmwS-Vk/view
Performance results on blink_perf.Paint[1]:
color-changes.html: -3.4%
large-table-background-change-with-invisible-collapsed-borders.html: -19.2%
large-table-background-change-with-visible-collapsed-borders.html: -3.0%
large-table-collapsed-border-change.html: -0.4%
large-table-collapsed-border-change-with-backgrounds.html: -6.8%
large-table-collapsed-border-change-with-text.html: -17.2%
large-table-repaint.html: -6.0%
paint-offset-changes.html: -4.7%
transform-changes.html: -2.7%
[1] tools/perf/run_benchmark blink_perf.paint --browser=content-shell-release --pageset-repeat=5 --extra-browser-args=--enable-slimming-paint-v2
BUG=645667
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Committed: https://crrev.com/6afc534ee0a973a25230fc5f6998ecfdbce781ee
Cr-Commit-Position: refs/heads/master@{#435681}
Patch Set 1 #Patch Set 2 : Fix mistake in not noticing property changes when clearing properties #Patch Set 3 : Faster setNeedsPaintPropertyUpdate when subtree updates are forced #Patch Set 4 : Fix a bug in not propagating frameview needsUpdate, and a bug due to throttled rendering #Patch Set 5 : Do not force subtree updates for all paint invalidation reasons, add todo to track paint offset cha… #
Total comments: 3
Patch Set 6 : Use typed enums to workaround win-specific clang warning C4805 about type conversions #Patch Set 7 : Switch away from typed enums which Windows clang does not like #
Total comments: 6
Patch Set 8 : Address chrishtrs comments #Messages
Total messages: 38 (27 generated)
|