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

Unified Diff: cc/resources/tile_manager_unittest.cc

Issue 471833002: cc: Add more eviction categories to picture layer impl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 4 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
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager_unittest.cc
diff --git a/cc/resources/tile_manager_unittest.cc b/cc/resources/tile_manager_unittest.cc
index 9cd251bbf4958d1ae6c5e75283cf2d39e72211de..030f8ab77ed5c787bfd458b9566bb99244040272 100644
--- a/cc/resources/tile_manager_unittest.cc
+++ b/cc/resources/tile_manager_unittest.cc
@@ -898,6 +898,8 @@ TEST_F(TileManagerTilePriorityQueueTest, EvictionTilePriorityQueue) {
tile_manager()->InitializeTilesWithResourcesForTesting(
std::vector<Tile*>(all_tiles.begin(), all_tiles.end()));
+ pending_layer_->MarkVisibleResourcesAsRequired();
+
Tile* last_tile = NULL;
smoothness_tiles.clear();
tile_count = 0;
@@ -916,8 +918,13 @@ TEST_F(TileManagerTilePriorityQueueTest, EvictionTilePriorityQueue) {
tile->priority(ACTIVE_TREE).priority_bin);
if (last_tile->priority(ACTIVE_TREE).priority_bin ==
tile->priority(ACTIVE_TREE).priority_bin) {
- EXPECT_GE(last_tile->priority(ACTIVE_TREE).distance_to_visible,
- tile->priority(ACTIVE_TREE).distance_to_visible);
+ EXPECT_LE(last_tile->required_for_activation(),
+ tile->required_for_activation());
+ if (last_tile->required_for_activation() ==
+ tile->required_for_activation()) {
+ EXPECT_GE(last_tile->priority(ACTIVE_TREE).distance_to_visible,
+ tile->priority(ACTIVE_TREE).distance_to_visible);
+ }
}
last_tile = tile;
@@ -945,8 +952,13 @@ TEST_F(TileManagerTilePriorityQueueTest, EvictionTilePriorityQueue) {
tile->priority(PENDING_TREE).priority_bin);
if (last_tile->priority(PENDING_TREE).priority_bin ==
tile->priority(PENDING_TREE).priority_bin) {
- EXPECT_GE(last_tile->priority(PENDING_TREE).distance_to_visible,
- tile->priority(PENDING_TREE).distance_to_visible);
+ EXPECT_LE(last_tile->required_for_activation(),
+ tile->required_for_activation());
+ if (last_tile->required_for_activation() ==
+ tile->required_for_activation()) {
+ EXPECT_GE(last_tile->priority(PENDING_TREE).distance_to_visible,
+ tile->priority(PENDING_TREE).distance_to_visible);
+ }
}
last_tile = tile;
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698