Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3405)

Unified Diff: cc/test/fake_picture_layer_impl.h

Issue 881083002: cc: Clean up tilings in UpdateTiles as well as in AppendQuads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/test/fake_picture_layer_impl.h
diff --git a/cc/test/fake_picture_layer_impl.h b/cc/test/fake_picture_layer_impl.h
index a0e16e8345671277ad0f698daf5f6d4a15ab38c7..b34cd3e26a3d69392b22a2b8db2cd11d2e0ee019 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; }
« cc/layers/picture_layer_impl.cc ('K') | « cc/layers/picture_layer_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698