| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/test/fake_tile_manager.h" | 5 #include "cc/test/fake_tile_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| 11 #include <limits> | 11 #include <limits> |
| 12 | 12 |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
| 15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
| 16 #include "cc/raster/raster_buffer.h" | 16 #include "cc/raster/raster_buffer.h" |
| 17 #include "cc/raster/synchronous_task_graph_runner.h" | 17 #include "cc/raster/synchronous_task_graph_runner.h" |
| 18 #include "cc/test/fake_tile_task_manager.h" | 18 #include "cc/test/fake_tile_task_manager.h" |
| 19 #include "cc/trees/layer_tree_settings.h" | 19 #include "cc/trees/layer_tree_settings.h" |
| 20 | 20 |
| 21 namespace cc { | 21 namespace cc { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 base::LazyInstance<SynchronousTaskGraphRunner> g_synchronous_task_graph_runner = | 25 base::LazyInstance<SynchronousTaskGraphRunner>::DestructorAtExit |
| 26 LAZY_INSTANCE_INITIALIZER; | 26 g_synchronous_task_graph_runner = LAZY_INSTANCE_INITIALIZER; |
| 27 | 27 |
| 28 base::LazyInstance<FakeRasterBufferProviderImpl> g_fake_raster_buffer_provider = | 28 base::LazyInstance<FakeRasterBufferProviderImpl>::DestructorAtExit |
| 29 LAZY_INSTANCE_INITIALIZER; | 29 g_fake_raster_buffer_provider = LAZY_INSTANCE_INITIALIZER; |
| 30 | 30 |
| 31 } // namespace | 31 } // namespace |
| 32 | 32 |
| 33 FakeTileManager::FakeTileManager(TileManagerClient* client, | 33 FakeTileManager::FakeTileManager(TileManagerClient* client, |
| 34 ResourcePool* resource_pool) | 34 ResourcePool* resource_pool) |
| 35 : TileManager(client, | 35 : TileManager(client, |
| 36 base::ThreadTaskRunnerHandle::Get().get(), | 36 base::ThreadTaskRunnerHandle::Get().get(), |
| 37 nullptr, | 37 nullptr, |
| 38 std::numeric_limits<size_t>::max(), | 38 std::numeric_limits<size_t>::max(), |
| 39 TileManagerSettings()), | 39 TileManagerSettings()), |
| (...skipping 11 matching lines...) Expand all Loading... |
| 51 | 51 |
| 52 FakeTileManager::~FakeTileManager() {} | 52 FakeTileManager::~FakeTileManager() {} |
| 53 | 53 |
| 54 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) { | 54 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) { |
| 55 return std::find(tiles_for_raster.begin(), | 55 return std::find(tiles_for_raster.begin(), |
| 56 tiles_for_raster.end(), | 56 tiles_for_raster.end(), |
| 57 tile) != tiles_for_raster.end(); | 57 tile) != tiles_for_raster.end(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace cc | 60 } // namespace cc |
| OLD | NEW |