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

Unified Diff: cc/resources/tile_manager.h

Issue 862263004: cc: Make eviction queue building consistent with raster. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/eviction_tile_priority_queue.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.h
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index e26470b9dbb497fac93a09be3f0d454d0b41a004..0e672e577976ea41ba426926b184ec1ca4dfc520 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -67,9 +67,8 @@ class CC_EXPORT TileManagerClient {
// Given an empty eviction tile priority queue, this will build a priority
// queue that will return tiles in order in which they should be evicted.
// Note if the queue was previous built, Reset must be called on it.
- // TODO(vmpstr): Change this to scoped_ptr<EvictionQueue> Build...
- virtual void BuildEvictionQueue(EvictionTilePriorityQueue* queue,
- TreePriority tree_priority) = 0;
+ virtual scoped_ptr<EvictionTilePriorityQueue> BuildEvictionQueue(
+ TreePriority tree_priority) = 0;
protected:
virtual ~TileManagerClient() {}
@@ -248,10 +247,14 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
SkPixelRef* pixel_ref);
scoped_refptr<RasterTask> CreateRasterTask(Tile* tile);
- void RebuildEvictionQueueIfNeeded();
- bool FreeTileResourcesUntilUsageIsWithinLimit(const MemoryUsage& limit,
- MemoryUsage* usage);
- bool FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit(
+ scoped_ptr<EvictionTilePriorityQueue>
+ FreeTileResourcesUntilUsageIsWithinLimit(
+ scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
+ const MemoryUsage& limit,
+ MemoryUsage* usage);
+ scoped_ptr<EvictionTilePriorityQueue>
+ FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit(
+ scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
const MemoryUsage& limit,
const TilePriority& oother_priority,
MemoryUsage* usage);
@@ -306,9 +309,6 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
UniqueNotifier ready_to_draw_check_notifier_;
UniqueNotifier more_tiles_need_prepare_check_notifier_;
- EvictionTilePriorityQueue eviction_priority_queue_;
- bool eviction_priority_queue_is_up_to_date_;
-
bool did_notify_ready_to_activate_;
bool did_notify_ready_to_draw_;
« no previous file with comments | « cc/resources/eviction_tile_priority_queue.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698