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

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

Issue 1866043006: cc: Remove ScheduleOnOriginThread() and CompleteOnOriginThread(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 7 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/tiles/software_image_decode_controller_unittest.cc ('k') | cc/tiles/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_TILES_TILE_MANAGER_H_ 5 #ifndef CC_TILES_TILE_MANAGER_H_
6 #define CC_TILES_TILE_MANAGER_H_ 6 #define CC_TILES_TILE_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 void SetMoreTilesNeedToBeRasterizedForTesting() { 192 void SetMoreTilesNeedToBeRasterizedForTesting() {
193 all_tiles_that_need_to_be_rasterized_are_scheduled_ = false; 193 all_tiles_that_need_to_be_rasterized_are_scheduled_ = false;
194 } 194 }
195 195
196 bool HasScheduledTileTasksForTesting() const { 196 bool HasScheduledTileTasksForTesting() const {
197 return has_scheduled_tile_tasks_; 197 return has_scheduled_tile_tasks_;
198 } 198 }
199 199
200 void OnRasterTaskCompleted(std::unique_ptr<RasterBuffer> raster_buffer,
201 Tile* tile,
202 Resource* resource,
203 bool was_canceled);
204
200 protected: 205 protected:
201 TileManager(TileManagerClient* client, 206 TileManager(TileManagerClient* client,
202 scoped_refptr<base::SequencedTaskRunner> task_runner, 207 scoped_refptr<base::SequencedTaskRunner> task_runner,
203 size_t scheduled_raster_task_limit, 208 size_t scheduled_raster_task_limit,
204 bool use_partial_raster); 209 bool use_partial_raster);
205 210
206 void FreeResourcesForReleasedTiles(); 211 void FreeResourcesForReleasedTiles();
207 void CleanUpReleasedTiles(); 212 void CleanUpReleasedTiles();
208 213
209 friend class Tile; 214 friend class Tile;
(...skipping 27 matching lines...) Expand all
237 MemoryUsage operator-(const MemoryUsage& other); 242 MemoryUsage operator-(const MemoryUsage& other);
238 243
239 bool Exceeds(const MemoryUsage& limit) const; 244 bool Exceeds(const MemoryUsage& limit) const;
240 int64_t memory_bytes() const { return memory_bytes_; } 245 int64_t memory_bytes() const { return memory_bytes_; }
241 246
242 private: 247 private:
243 int64_t memory_bytes_; 248 int64_t memory_bytes_;
244 int resource_count_; 249 int resource_count_;
245 }; 250 };
246 251
247 void OnRasterTaskCompleted(
248 Tile::Id tile,
249 Resource* resource,
250 bool was_canceled);
251
252 void FreeResourcesForTile(Tile* tile); 252 void FreeResourcesForTile(Tile* tile);
253 void FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(Tile* tile); 253 void FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(Tile* tile);
254 scoped_refptr<TileTask> CreateRasterTask( 254 scoped_refptr<TileTask> CreateRasterTask(
255 const PrioritizedTile& prioritized_tile); 255 const PrioritizedTile& prioritized_tile);
256 256
257 std::unique_ptr<EvictionTilePriorityQueue> 257 std::unique_ptr<EvictionTilePriorityQueue>
258 FreeTileResourcesUntilUsageIsWithinLimit( 258 FreeTileResourcesUntilUsageIsWithinLimit(
259 std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue, 259 std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
260 const MemoryUsage& limit, 260 const MemoryUsage& limit,
261 MemoryUsage* usage); 261 MemoryUsage* usage);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_; 341 std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_;
342 342
343 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; 343 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_;
344 344
345 DISALLOW_COPY_AND_ASSIGN(TileManager); 345 DISALLOW_COPY_AND_ASSIGN(TileManager);
346 }; 346 };
347 347
348 } // namespace cc 348 } // namespace cc
349 349
350 #endif // CC_TILES_TILE_MANAGER_H_ 350 #endif // CC_TILES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/tiles/software_image_decode_controller_unittest.cc ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698