commit | 956d1c82d6e8263fecbd7d2240774a7363aea2c4 | [log] [tgz] |
---|---|---|
author | danakj <danakj@chromium.org> | Thu Sep 13 01:38:57 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Sep 13 01:38:57 2018 |
tree | 6a82b3a55a8c2e8efa643e466291a4a6b91ad797 | |
parent | f6335cea846624f22a5afe78baff6899927187aa [diff] |
Comment and clean up code for marking layers to PushPropertiesTo. The LayersThatShouldPushProperties() returned a non-const reference but did not need to, changed to const. The LayerNeedsPushPropertiesForTesting() method is not needed since tests can just check base::ContainsKey() against the already existing LayersThatShouldPushProperties(). The PushLayerPropertiesInternal() function was making a copy of the set of layers, because layers were removing them from the set, changed to take a const-ref as the layers are cleared afterward. Clarified variables inside the method for readability. PictureLayerImpls always PushPropertiesTo. Instead of causing them to mutate the set to reinsert themselves each frame (and preventing us from just clear()ing the set after pushing), walk all PictureLayerImpls separately from the set of layers that need PushPropertiesTo, and which should be removed from the set after pushing. Changed the set of layers from a std::unordered_set to a base::flat_set now that we have a better data type for describing sets of small numbers of small objects. In this case "large" sets are only ~100 and the objects are pointer-sized. TODO: We could still improve performance by batching inserts to the set. R=enne@chromium.org Bug: 854256 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I9411aa99016b806e585ee9e89ac19c4832f586d2 Reviewed-on: https://chromium-review.googlesource.com/1208356 Commit-Queue: danakj <danakj@chromium.org> Reviewed-by: enne <enne@chromium.org> Cr-Commit-Position: refs/heads/master@{#590888}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .