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

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

Issue 366113002: cc: Do not cleanup tiles with raster tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits updated. Created 6 years, 4 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 | « cc/resources/tile.cc ('k') | 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // Soft limit is used for resource pool such that 135 // Soft limit is used for resource pool such that
136 // memory returns to soft limit after going over. 136 // memory returns to soft limit after going over.
137 if (state != global_state_) { 137 if (state != global_state_) {
138 global_state_ = state; 138 global_state_ = state;
139 prioritized_tiles_dirty_ = true; 139 prioritized_tiles_dirty_ = true;
140 } 140 }
141 } 141 }
142 142
143 void SetRasterizerForTesting(Rasterizer* rasterizer); 143 void SetRasterizerForTesting(Rasterizer* rasterizer);
144 144
145 void CleanUpReleasedTilesForTesting() { CleanUpReleasedTiles(); } 145 void FreeResourcesAndCleanUpReleasedTilesForTesting() {
146 prioritized_tiles_.Clear();
147 FreeResourcesForReleasedTiles();
148 CleanUpReleasedTiles();
149 }
146 150
147 protected: 151 protected:
148 TileManager(TileManagerClient* client, 152 TileManager(TileManagerClient* client,
149 base::SequencedTaskRunner* task_runner, 153 base::SequencedTaskRunner* task_runner,
150 ResourcePool* resource_pool, 154 ResourcePool* resource_pool,
151 Rasterizer* rasterizer, 155 Rasterizer* rasterizer,
152 RenderingStatsInstrumentation* rendering_stats_instrumentation); 156 RenderingStatsInstrumentation* rendering_stats_instrumentation);
153 157
154 // Methods called by Tile 158 // Methods called by Tile
155 friend class Tile; 159 friend class Tile;
156 void DidChangeTilePriority(Tile* tile); 160 void DidChangeTilePriority(Tile* tile);
157 161
162 void FreeResourcesForReleasedTiles();
158 void CleanUpReleasedTiles(); 163 void CleanUpReleasedTiles();
159 164
160 // Overriden from RefCountedManager<Tile>: 165 // Overriden from RefCountedManager<Tile>:
161 virtual void Release(Tile* tile) OVERRIDE; 166 virtual void Release(Tile* tile) OVERRIDE;
162 167
163 // Overriden from RasterizerClient: 168 // Overriden from RasterizerClient:
164 virtual bool ShouldForceTasksRequiredForActivationToComplete() const OVERRIDE; 169 virtual bool ShouldForceTasksRequiredForActivationToComplete() const OVERRIDE;
165 virtual void DidFinishRunningTasks() OVERRIDE; 170 virtual void DidFinishRunningTasks() OVERRIDE;
166 virtual void DidFinishRunningTasksRequiredForActivation() OVERRIDE; 171 virtual void DidFinishRunningTasksRequiredForActivation() OVERRIDE;
167 172
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_; 254 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_;
250 255
251 UniqueNotifier ready_to_activate_check_notifier_; 256 UniqueNotifier ready_to_activate_check_notifier_;
252 257
253 DISALLOW_COPY_AND_ASSIGN(TileManager); 258 DISALLOW_COPY_AND_ASSIGN(TileManager);
254 }; 259 };
255 260
256 } // namespace cc 261 } // namespace cc
257 262
258 #endif // CC_RESOURCES_TILE_MANAGER_H_ 263 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/resources/tile.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698