diff options
author | vmpstr <vmpstr@chromium.org> | 2015-12-10 16:16:02 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-11 00:17:35 +0000 |
commit | 81a0239aafd625ec2d3312a4c322d96600f51b22 (patch) | |
tree | 3a3c8aecedd57accc887d7425879a02f4d20f49e /cc | |
parent | 2870b1db6b17eeb3c772000b7810ae19f75a0ccf (diff) | |
download | chromium_src-81a0239aafd625ec2d3312a4c322d96600f51b22.zip chromium_src-81a0239aafd625ec2d3312a4c322d96600f51b22.tar.gz chromium_src-81a0239aafd625ec2d3312a4c322d96600f51b22.tar.bz2 |
cc: Remove visual rects capacity when clearing.
This patch removes the capacity of the visual_rect when clearing it.
This should reduce cc memory usage a tiny bit.
R=enne
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1510903008
Cr-Commit-Position: refs/heads/master@{#364540}
Diffstat (limited to 'cc')
-rw-r--r-- | cc/playback/display_item_list.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cc/playback/display_item_list.cc b/cc/playback/display_item_list.cc index 821dfce..aab56fc 100644 --- a/cc/playback/display_item_list.cc +++ b/cc/playback/display_item_list.cc @@ -165,7 +165,9 @@ void DisplayItemList::Finalize() { // TODO(vmpstr): Build and make use of an RTree from the visual // rects. For now we just clear them out since we won't ever need // them to stick around post-Finalize. http://crbug.com/527245 - visual_rects_.clear(); + // This clears both the vector and the vector's capacity, since visual_rects_ + // won't be used anymore. + std::vector<gfx::Rect>().swap(visual_rects_); if (settings_.use_cached_picture) { // Convert to an SkPicture for faster rasterization. |