PaintTreeWalk: Avoid temporary allocations
PaintTreeWalk is a stack-scoped object that accumulates a significant
amount of temporary objects:
- Avoid dynamic allocation of PaintTreeWalk itself;
- Eagerly freeing the backing of context_storage_ which may accumulate
several MB floating garbage;
- Revert PaintPropertyTreeBuilderContext to an inlined object with
Trace() method to avoid another temporary allocation;
Bug: 1197697
Change-Id: I6b5abc1e63b1919b5b816791f0eec2f5db75acf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2831589
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Yuki Yamada <yukiy@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#874446}
GitOrigin-RevId: cf8a6de85818b91695710c8f636cfdf782cf8b04
6 files changed