Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Side by Side Diff: cc/resources/tile_manager.h

Issue 594703002: cc: Don't activate rasterize on demand when we have 0 memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/resources/tile_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_RESOURCES_TILE_MANAGER_H_ 5 #ifndef CC_RESOURCES_TILE_MANAGER_H_
6 #define CC_RESOURCES_TILE_MANAGER_H_ 6 #define CC_RESOURCES_TILE_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 void SetRasterizerForTesting(Rasterizer* rasterizer); 158 void SetRasterizerForTesting(Rasterizer* rasterizer);
159 159
160 void FreeResourcesAndCleanUpReleasedTilesForTesting() { 160 void FreeResourcesAndCleanUpReleasedTilesForTesting() {
161 prioritized_tiles_.Clear(); 161 prioritized_tiles_.Clear();
162 FreeResourcesForReleasedTiles(); 162 FreeResourcesForReleasedTiles();
163 CleanUpReleasedTiles(); 163 CleanUpReleasedTiles();
164 } 164 }
165 165
166 std::vector<Tile*> AllTilesForTesting() const {
167 std::vector<Tile*> tiles;
168 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end();
169 ++it) {
170 tiles.push_back(it->second);
171 }
172 return tiles;
173 }
174
166 protected: 175 protected:
167 TileManager(TileManagerClient* client, 176 TileManager(TileManagerClient* client,
168 const scoped_refptr<base::SequencedTaskRunner>& task_runner, 177 const scoped_refptr<base::SequencedTaskRunner>& task_runner,
169 ResourcePool* resource_pool, 178 ResourcePool* resource_pool,
170 Rasterizer* rasterizer, 179 Rasterizer* rasterizer,
171 RenderingStatsInstrumentation* rendering_stats_instrumentation); 180 RenderingStatsInstrumentation* rendering_stats_instrumentation);
172 181
173 // Methods called by Tile 182 // Methods called by Tile
174 friend class Tile; 183 friend class Tile;
175 void DidChangeTilePriority(Tile* tile); 184 void DidChangeTilePriority(Tile* tile);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_; 278 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_;
270 279
271 UniqueNotifier ready_to_activate_check_notifier_; 280 UniqueNotifier ready_to_activate_check_notifier_;
272 281
273 DISALLOW_COPY_AND_ASSIGN(TileManager); 282 DISALLOW_COPY_AND_ASSIGN(TileManager);
274 }; 283 };
275 284
276 } // namespace cc 285 } // namespace cc
277 286
278 #endif // CC_RESOURCES_TILE_MANAGER_H_ 287 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698