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 #ifndef CC_TILE_MANAGER_H_ | 5 #ifndef CC_TILE_MANAGER_H_ |
6 #define CC_TILE_MANAGER_H_ | 6 #define CC_TILE_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "cc/tile_priority.h" | 11 #include "cc/tile_priority.h" |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 | 14 |
15 class Tile; | 15 class Tile; |
16 class TileVersion; | 16 class TileVersion; |
17 class ResourceProvider; | 17 class ResourceProvider; |
18 | 18 |
19 class TileManagerClient { | 19 class TileManagerClient { |
20 public: | 20 public: |
21 virtual void ScheduleManageTiles() = 0; | 21 virtual void ScheduleManageTiles() = 0; |
22 | 22 |
23 protected: | 23 protected: |
24 ~TileManagerClient() { } | 24 virtual ~TileManagerClient() {} |
25 }; | 25 }; |
26 | 26 |
27 // This class manages tiles, deciding which should get rasterized and which | 27 // This class manages tiles, deciding which should get rasterized and which |
28 // should no longer have any memory assigned to them. Tile objects are "owned" | 28 // should no longer have any memory assigned to them. Tile objects are "owned" |
29 // by layers; they automatically register with the manager when they are | 29 // by layers; they automatically register with the manager when they are |
30 // created, and unregister from the manager when they are deleted. | 30 // created, and unregister from the manager when they are deleted. |
31 class TileManager { | 31 class TileManager { |
32 public: | 32 public: |
33 TileManager(TileManagerClient* client); | 33 TileManager(TileManagerClient* client); |
34 ~TileManager(); | 34 ~TileManager(); |
(...skipping 11 matching lines...) Expand all Loading... |
46 friend class Tile; | 46 friend class Tile; |
47 void ScheduleManageTiles(); | 47 void ScheduleManageTiles(); |
48 | 48 |
49 TileManagerClient* client_; | 49 TileManagerClient* client_; |
50 bool manage_tiles_pending_; | 50 bool manage_tiles_pending_; |
51 | 51 |
52 GlobalStateThatImpactsTilePriority global_state_; | 52 GlobalStateThatImpactsTilePriority global_state_; |
53 std::vector<TileVersion*> tile_versions_; | 53 std::vector<TileVersion*> tile_versions_; |
54 }; | 54 }; |
55 | 55 |
56 } | 56 } // namespace cc |
57 | 57 |
58 #endif | 58 #endif // CC_TILE_MANAGER_H_ |
OLD | NEW |