OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/resources/eviction_tile_priority_queue.h" | 5 #include "cc/resources/eviction_tile_priority_queue.h" |
6 #include "cc/resources/raster_tile_priority_queue.h" | 6 #include "cc/resources/raster_tile_priority_queue.h" |
7 #include "cc/resources/tile.h" | 7 #include "cc/resources/tile.h" |
8 #include "cc/resources/tile_priority.h" | 8 #include "cc/resources/tile_priority.h" |
9 #include "cc/resources/tiling_set_raster_queue_all.h" | 9 #include "cc/resources/tiling_set_raster_queue_all.h" |
10 #include "cc/test/begin_frame_args_test.h" | 10 #include "cc/test/begin_frame_args_test.h" |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 break; | 557 break; |
558 | 558 |
559 all_tiles.push_back(tile); | 559 all_tiles.push_back(tile); |
560 queue->Pop(); | 560 queue->Pop(); |
561 } | 561 } |
562 | 562 |
563 tile_manager()->InitializeTilesWithResourcesForTesting( | 563 tile_manager()->InitializeTilesWithResourcesForTesting( |
564 std::vector<Tile*>(all_tiles.begin(), all_tiles.end())); | 564 std::vector<Tile*>(all_tiles.begin(), all_tiles.end())); |
565 | 565 |
566 // Ensure we can activate. | 566 // Ensure we can activate. |
567 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); | 567 EXPECT_TRUE(tile_manager()->IsReadyToActivate()); |
568 EXPECT_TRUE(pending_child_raw->AllTilesRequiredForActivationAreReadyToDraw()); | |
569 } | 568 } |
570 | 569 |
571 TEST_F(TileManagerTilePriorityQueueTest, EvictionTilePriorityQueue) { | 570 TEST_F(TileManagerTilePriorityQueueTest, EvictionTilePriorityQueue) { |
572 const gfx::Size layer_bounds(1000, 1000); | 571 const gfx::Size layer_bounds(1000, 1000); |
573 host_impl_.SetViewportSize(layer_bounds); | 572 host_impl_.SetViewportSize(layer_bounds); |
574 SetupDefaultTrees(layer_bounds); | 573 SetupDefaultTrees(layer_bounds); |
575 | 574 |
576 scoped_ptr<EvictionTilePriorityQueue> empty_queue( | 575 scoped_ptr<EvictionTilePriorityQueue> empty_queue( |
577 host_impl_.BuildEvictionQueue(SAME_PRIORITY_FOR_BOTH_TREES)); | 576 host_impl_.BuildEvictionQueue(SAME_PRIORITY_FOR_BOTH_TREES)); |
578 EXPECT_TRUE(empty_queue->IsEmpty()); | 577 EXPECT_TRUE(empty_queue->IsEmpty()); |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1248 EXPECT_GT(eventually_bin_order_correct_count, | 1247 EXPECT_GT(eventually_bin_order_correct_count, |
1249 eventually_bin_order_incorrect_count); | 1248 eventually_bin_order_incorrect_count); |
1250 | 1249 |
1251 EXPECT_TRUE(have_tiles[TilePriority::NOW]); | 1250 EXPECT_TRUE(have_tiles[TilePriority::NOW]); |
1252 EXPECT_TRUE(have_tiles[TilePriority::SOON]); | 1251 EXPECT_TRUE(have_tiles[TilePriority::SOON]); |
1253 EXPECT_TRUE(have_tiles[TilePriority::EVENTUALLY]); | 1252 EXPECT_TRUE(have_tiles[TilePriority::EVENTUALLY]); |
1254 } | 1253 } |
1255 | 1254 |
1256 } // namespace | 1255 } // namespace |
1257 } // namespace cc | 1256 } // namespace cc |
OLD | NEW |