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

Unified Diff: cc/resources/tile_manager.h

Issue 18581004: cc: Remove tile ref counting in tile manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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
Index: cc/resources/tile_manager.h
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index 7bec1c48f90d0980922b80eb2c5493890fe6d7bc..026076077bf89a4edada88a906fb9294b4981057 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -111,12 +111,13 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient {
virtual void ScheduleTasks();
private:
+ typedef uint64 ManagedTileId;
reveman 2013/07/03 00:32:47 can you move this to the Tile class instead? Tile:
vmpstr 2013/07/03 19:08:04 I added a todo here. Right now doing this would ca
reveman 2013/07/03 20:20:06 Ah, lets just make sure this is fixed before landi
vmpstr 2013/07/03 23:47:51 Agreed.
void OnImageDecodeTaskCompleted(
int layer_id,
skia::LazyPixelRef* pixel_ref,
bool was_canceled);
void OnRasterTaskCompleted(
- scoped_refptr<Tile> tile,
+ ManagedTileId tile,
scoped_ptr<ResourcePool::Resource> resource,
RasterMode raster_mode,
const PicturePileImpl::Analysis& analysis,
@@ -165,6 +166,9 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient {
typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap;
LayerPixelRefTaskMap image_decode_tasks_;
+ typedef base::hash_map<ManagedTileId, Tile*> ManagedTileMap;
reveman 2013/07/03 00:32:47 I like naming these based on the value type. How a
vmpstr 2013/07/03 19:08:04 Done.
+ ManagedTileMap managed_tile_map_;
reveman 2013/07/03 00:32:47 we usually don't use the type in the name for thes
vmpstr 2013/07/03 19:08:04 Named it managed_tiles_ for now.
+
DISALLOW_COPY_AND_ASSIGN(TileManager);
};

Powered by Google App Engine
This is Rietveld 408576698