diff options
author | vmpstr <vmpstr@chromium.org> | 2015-01-27 20:09:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-28 04:10:46 +0000 |
commit | 5c115e7db2f2845b5fe4a687dc33d5f2340b5d60 (patch) | |
tree | b057c5c3bf152030feaefc3138046bc139e40e06 /cc/test/fake_picture_layer_impl.h | |
parent | 7810214e0a59d622add492497b61f5fa70b69d78 (diff) | |
download | chromium_src-5c115e7db2f2845b5fe4a687dc33d5f2340b5d60.zip chromium_src-5c115e7db2f2845b5fe4a687dc33d5f2340b5d60.tar.gz chromium_src-5c115e7db2f2845b5fe4a687dc33d5f2340b5d60.tar.bz2 |
cc: Clean up tilings in UpdateTiles as well as in AppendQuads.
Sometimes we get into situations where we get frequent UpdateTiles,
but no AppendQuads. As a result we can start accumulating tilings
(during pinch zoom for example), but we never free any of them, since
the code to free tilings happens only during AppendQuads. This patch
remedies this by ensuring that if AppendQuads doesn't clean up the
tilings, and we've added some since last time we ran UpdateTiles,
we clean them up.
R=danakj
BUG=452304
Review URL: https://codereview.chromium.org/881083002
Cr-Commit-Position: refs/heads/master@{#313428}
Diffstat (limited to 'cc/test/fake_picture_layer_impl.h')
-rw-r--r-- | cc/test/fake_picture_layer_impl.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/test/fake_picture_layer_impl.h b/cc/test/fake_picture_layer_impl.h index a0e16e8..b34cd3e 100644 --- a/cc/test/fake_picture_layer_impl.h +++ b/cc/test/fake_picture_layer_impl.h @@ -121,6 +121,14 @@ class FakePictureLayerImpl : public PictureLayerImpl { void ResetAllTilesPriorities(); PictureLayerTilingSet* GetTilings() { return tilings_.get(); } + // Add the given tiling as a "used" tiling during AppendQuads. This ensures + // that future calls to UpdateTiles don't delete the tiling. + void MarkAllTilingsUsed() { + last_append_quads_tilings_.clear(); + for (size_t i = 0; i < tilings_->num_tilings(); ++i) + last_append_quads_tilings_.push_back(tilings_->tiling_at(i)); + } + size_t release_resources_count() const { return release_resources_count_; } void reset_release_resources_count() { release_resources_count_ = 0; } |