| 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 <list> | 8 #include <list> | 
| 9 #include <queue> | 9 #include <queue> | 
| 10 #include <vector> | 10 #include <vector> | 
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 86 }; | 86 }; | 
| 87 | 87 | 
| 88 // This class manages tiles, deciding which should get rasterized and which | 88 // This class manages tiles, deciding which should get rasterized and which | 
| 89 // should no longer have any memory assigned to them. Tile objects are "owned" | 89 // should no longer have any memory assigned to them. Tile objects are "owned" | 
| 90 // by layers; they automatically register with the manager when they are | 90 // by layers; they automatically register with the manager when they are | 
| 91 // created, and unregister from the manager when they are deleted. | 91 // created, and unregister from the manager when they are deleted. | 
| 92 class CC_EXPORT TileManager { | 92 class CC_EXPORT TileManager { | 
| 93  public: | 93  public: | 
| 94   TileManager(TileManagerClient* client, | 94   TileManager(TileManagerClient* client, | 
| 95               ResourceProvider *resource_provider, | 95               ResourceProvider *resource_provider, | 
| 96               size_t num_raster_threads); | 96               size_t num_raster_threads, | 
|  | 97               bool record_rendering_stats); | 
| 97   virtual ~TileManager(); | 98   virtual ~TileManager(); | 
| 98 | 99 | 
| 99   const GlobalStateThatImpactsTilePriority& GlobalState() const { | 100   const GlobalStateThatImpactsTilePriority& GlobalState() const { | 
| 100       return global_state_; | 101       return global_state_; | 
| 101   } | 102   } | 
| 102   void SetGlobalState(const GlobalStateThatImpactsTilePriority& state); | 103   void SetGlobalState(const GlobalStateThatImpactsTilePriority& state); | 
| 103 | 104 | 
| 104   void ManageTiles(); | 105   void ManageTiles(); | 
| 105   void CheckForCompletedTileUploads(); | 106   void CheckForCompletedTileUploads(); | 
| 106 | 107 | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 162   TileList tiles_with_image_decoding_tasks_; | 163   TileList tiles_with_image_decoding_tasks_; | 
| 163 | 164 | 
| 164   typedef base::hash_map<uint32_t, skia::LazyPixelRef*> PixelRefMap; | 165   typedef base::hash_map<uint32_t, skia::LazyPixelRef*> PixelRefMap; | 
| 165   PixelRefMap pending_decode_tasks_; | 166   PixelRefMap pending_decode_tasks_; | 
| 166 | 167 | 
| 167   typedef std::queue<scoped_refptr<Tile> > TileQueue; | 168   typedef std::queue<scoped_refptr<Tile> > TileQueue; | 
| 168   TileQueue tiles_with_pending_set_pixels_; | 169   TileQueue tiles_with_pending_set_pixels_; | 
| 169   size_t bytes_pending_set_pixels_; | 170   size_t bytes_pending_set_pixels_; | 
| 170   bool ever_exceeded_memory_budget_; | 171   bool ever_exceeded_memory_budget_; | 
| 171 | 172 | 
|  | 173   bool record_rendering_stats_; | 
| 172   RenderingStats rendering_stats_; | 174   RenderingStats rendering_stats_; | 
| 173 | 175 | 
| 174   int raster_state_count_[NUM_STATES][NUM_TREES][NUM_BINS]; | 176   int raster_state_count_[NUM_STATES][NUM_TREES][NUM_BINS]; | 
| 175 | 177 | 
| 176   DISALLOW_COPY_AND_ASSIGN(TileManager); | 178   DISALLOW_COPY_AND_ASSIGN(TileManager); | 
| 177 }; | 179 }; | 
| 178 | 180 | 
| 179 }  // namespace cc | 181 }  // namespace cc | 
| 180 | 182 | 
| 181 #endif  // CC_TILE_MANAGER_H_ | 183 #endif  // CC_TILE_MANAGER_H_ | 
| OLD | NEW | 
|---|