| 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/test/fake_impl_proxy.h" | 9 #include "cc/test/fake_impl_proxy.h" |
| 10 #include "cc/test/fake_layer_tree_host_impl.h" | 10 #include "cc/test/fake_layer_tree_host_impl.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 state.tree_priority = tree_priority; | 48 state.tree_priority = tree_priority; |
| 49 | 49 |
| 50 global_state_ = state; | 50 global_state_ = state; |
| 51 host_impl_.resource_pool()->SetResourceUsageLimits( | 51 host_impl_.resource_pool()->SetResourceUsageLimits( |
| 52 state.soft_memory_limit_in_bytes, | 52 state.soft_memory_limit_in_bytes, |
| 53 state.soft_memory_limit_in_bytes, | 53 state.soft_memory_limit_in_bytes, |
| 54 state.num_resources_limit); | 54 state.num_resources_limit); |
| 55 host_impl_.tile_manager()->SetGlobalStateForTesting(state); | 55 host_impl_.tile_manager()->SetGlobalStateForTesting(state); |
| 56 } | 56 } |
| 57 | 57 |
| 58 virtual void SetUp() override { | 58 void SetUp() override { |
| 59 InitializeRenderer(); | 59 InitializeRenderer(); |
| 60 SetTreePriority(SAME_PRIORITY_FOR_BOTH_TREES); | 60 SetTreePriority(SAME_PRIORITY_FOR_BOTH_TREES); |
| 61 } | 61 } |
| 62 | 62 |
| 63 virtual void InitializeRenderer() { | 63 virtual void InitializeRenderer() { |
| 64 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d()); | 64 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d()); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void SetupDefaultTrees(const gfx::Size& layer_bounds) { | 67 void SetupDefaultTrees(const gfx::Size& layer_bounds) { |
| 68 gfx::Size tile_size(100, 100); | 68 gfx::Size tile_size(100, 100); |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 all_tiles.insert(queue.Top()); | 858 all_tiles.insert(queue.Top()); |
| 859 ++tile_count; | 859 ++tile_count; |
| 860 queue.Pop(); | 860 queue.Pop(); |
| 861 } | 861 } |
| 862 EXPECT_EQ(tile_count, all_tiles.size()); | 862 EXPECT_EQ(tile_count, all_tiles.size()); |
| 863 EXPECT_EQ(16u, tile_count); | 863 EXPECT_EQ(16u, tile_count); |
| 864 } | 864 } |
| 865 | 865 |
| 866 } // namespace | 866 } // namespace |
| 867 } // namespace cc | 867 } // namespace cc |
| OLD | NEW |