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
tree: edd4e36a0f9a5a2fb27cc1e3164caad9d3fd59a0
  1. abseil-cpp/
  2. accessibility-audit/
  3. accessibility_test_framework/
  4. afl/
  5. android_build_tools/
  6. android_crazy_linker/
  7. android_data_chart/
  8. android_deps/
  9. android_deps_autorolled/
  10. android_media/
  11. android_opengl/
  12. android_platform/
  13. android_protobuf/
  14. android_protoc/
  15. android_provider/
  16. android_sdk/
  17. android_support_test_runner/
  18. android_swipe_refresh/
  19. android_system_sdk/
  20. androidx/
  21. apache-mac/
  22. apache-portable-runtime/
  23. apache-win32/
  24. apple_apsl/
  25. arcore-android-sdk/
  26. arcore-android-sdk-client/
  27. ashmem/
  28. axe-core/
  29. bazel/
  30. blanketjs/
  31. blink/
  32. boringssl/
  33. bouncycastle/
  34. breakpad/
  35. brotli/
  36. bspatch/
  37. byte_buddy/
  38. ced/
  39. chaijs/
  40. checkstyle/
  41. chromevox/
  42. cld_3/
  43. cldr/
  44. closure_compiler/
  45. colorama/
  46. crashpad/
  47. crc32c/
  48. d3/
  49. dav1d/
  50. decklink/
  51. devscripts/
  52. dom_distiller_js/
  53. dpkg-shlibdeps/
  54. eigen3/
  55. emoji-metadata/
  56. emoji-segmenter/
  57. espresso/
  58. expat/
  59. farmhash/
  60. fdlibm/
  61. feed_library/
  62. fft2d/
  63. flatbuffers/
  64. fontconfig/
  65. fp16/
  66. freetype/
  67. freetype-testing/
  68. fuchsia-sdk/
  69. fusejs/
  70. gemmlowp/
  71. gif_player/
  72. glfw/
  73. google-closure-library/
  74. google-truth/
  75. google_android_play_core/
  76. google_appengine_cloudstorage/
  77. google_benchmark/
  78. google_input_tools/
  79. google_toolbox_for_mac/
  80. google_trust_services/
  81. googletest/
  82. gradle_wrapper/
  83. grpc/
  84. gvr-android-keyboard/
  85. gvr-android-sdk/
  86. hamcrest/
  87. harfbuzz-ng/
  88. highway/
  89. hunspell/
  90. hyphenation-patterns/
  91. iaccessible2/
  92. iccjpeg/
  93. icu4j/
  94. ijar/
  95. ink/
  96. inspector_protocol/
  97. instrumented_libraries/
  98. isimpledom/
  99. jacoco/
  100. javalang/
  101. jdk/
  102. jinja2/
  103. jsoncpp/
  104. jstemplate/
  105. junit/
  106. khronos/
  107. lcov/
  108. leveldatabase/
  109. libaddressinput/
  110. libaom/
  111. libavif/
  112. libbrlapi/
  113. libdrm/
  114. libFuzzer/
  115. libgav1/
  116. libipp/
  117. libjingle_xmpp/
  118. libjxl/
  119. liblouis/
  120. libphonenumber/
  121. libpng/
  122. libprotobuf-mutator/
  123. libsecret/
  124. libsync/
  125. libudev/
  126. liburlpattern/
  127. libusb/
  128. libva_protected_content/
  129. libvpx/
  130. libwebm/
  131. libwebp/
  132. libx11/
  133. libxcb-keysyms/
  134. libxml/
  135. libXNVCtrl/
  136. libxslt/
  137. libzip/
  138. logilab/
  139. lottie/
  140. lzma_sdk/
  141. mako/
  142. markdown/
  143. markupsafe/
  144. material_design_icons/
  145. mesa_headers/
  146. metrics_proto/
  147. microsoft_webauthn/
  148. minigbm/
  149. minizip/
  150. mocha/
  151. mockito/
  152. modp_b64/
  153. motemplate/
  154. mozilla/
  155. nearby/
  156. neon_2_sse/
  157. netty-tcnative/
  158. netty4/
  159. node/
  160. objenesis/
  161. ocmock/
  162. one_euro_filter/
  163. opencv/
  164. openh264/
  165. openscreen/
  166. openxr/
  167. opus/
  168. ots/
  169. ow2_asm/
  170. pexpect/
  171. pffft/
  172. ply/
  173. polymer/
  174. private-join-and-compute/
  175. private_membership/
  176. proguard/
  177. protobuf/
  178. protoc_javalite/
  179. pycoverage/
  180. pyjson5/
  181. pylint/
  182. pystache/
  183. Python-Markdown/
  184. pywebsocket3/
  185. qcms/
  186. quic_trace/
  187. qunit/
  188. r8/
  189. re2/
  190. requests/
  191. rnnoise/
  192. robolectric/
  193. ruy/
  194. s2cellid/
  195. securemessage/
  196. setupdesign/
  197. shaderc/
  198. shell-encryption/
  199. simplejson/
  200. sinonjs/
  201. six/
  202. smhasher/
  203. snappy/
  204. speech-dispatcher/
  205. sqlite/
  206. sqlite4java/
  207. subresource-filter-ruleset/
  208. sudden_motion_sensor/
  209. tcmalloc/
  210. tensorflow-text/
  211. test_fonts/
  212. text-fragments-polyfill/
  213. tflite/
  214. tflite-support/
  215. tlslite/
  216. turbine/
  217. ub-uiautomator/
  218. ukey2/
  219. unrar/
  220. updater/
  221. usb_ids/
  222. usrsctp/
  223. utf/
  224. v4l-utils/
  225. wayland/
  226. wayland-protocols/
  227. web-animations-js/
  228. webdriver/
  229. webgl/
  230. webgpu-cts/
  231. webpagereplay/
  232. webrtc_overrides/
  233. webxr_test_pages/
  234. weston/
  235. widevine/
  236. win_build_output/
  237. woff2/
  238. wpt_tools/
  239. wtl/
  240. wuffs/
  241. x11proto/
  242. xcbproto/
  243. zlib/
  244. zxcvbn-cpp/
  245. .gitignore
  246. BUILD.gn
  247. DEPS
  248. libjpeg.gni
  249. OWNERS
  250. PRESUBMIT.py
  251. README.chromium
  252. README.chromium.template