| Index: trunk/src/cc/resources/tile_manager.h
|
| ===================================================================
|
| --- trunk/src/cc/resources/tile_manager.h (revision 202735)
|
| +++ trunk/src/cc/resources/tile_manager.h (working copy)
|
| @@ -62,8 +62,6 @@
|
| // created, and unregister from the manager when they are deleted.
|
| class CC_EXPORT TileManager : public WorkerPoolClient {
|
| public:
|
| - typedef base::hash_set<uint32_t> PixelRefSet;
|
| -
|
| static scoped_ptr<TileManager> Create(
|
| TileManagerClient* client,
|
| ResourceProvider* resource_provider,
|
| @@ -118,7 +116,7 @@
|
| void UnregisterTile(Tile* tile);
|
|
|
| // Virtual for test
|
| - virtual void ScheduleTasks();
|
| + virtual void DispatchMoreTasks();
|
|
|
| private:
|
| // Data that is passed to raster tasks.
|
| @@ -131,6 +129,8 @@
|
| int source_frame_number;
|
| };
|
|
|
| + RasterTaskMetadata GetRasterTaskMetadata(const Tile& tile) const;
|
| +
|
| void AssignBinsToTiles();
|
| void SortTiles();
|
| void AssignGpuMemoryToTiles();
|
| @@ -142,19 +142,20 @@
|
| client_->ScheduleManageTiles();
|
| manage_tiles_pending_ = true;
|
| }
|
| - RasterWorkerPool::Task CreateImageDecodeTask(
|
| - Tile* tile, skia::LazyPixelRef* pixel_ref);
|
| + bool DispatchImageDecodeTasksForTile(Tile* tile);
|
| + void DispatchOneImageDecodeTask(
|
| + scoped_refptr<Tile> tile, skia::LazyPixelRef* pixel_ref);
|
| void OnImageDecodeTaskCompleted(
|
| scoped_refptr<Tile> tile,
|
| - uint32_t pixel_ref_id,
|
| - bool was_canceled);
|
| - RasterTaskMetadata GetRasterTaskMetadata(const Tile& tile) const;
|
| - RasterWorkerPool::Task CreateRasterTask(Tile* tile);
|
| + uint32_t pixel_ref_id);
|
| + bool CanDispatchRasterTask(Tile* tile) const;
|
| + scoped_ptr<ResourcePool::Resource> PrepareTileForRaster(Tile* tile);
|
| + void DispatchOneRasterTask(scoped_refptr<Tile> tile);
|
| void OnRasterTaskCompleted(
|
| scoped_refptr<Tile> tile,
|
| scoped_ptr<ResourcePool::Resource> resource,
|
| PicturePileImpl::Analysis* analysis,
|
| - bool was_canceled);
|
| + int manage_tiles_call_count_when_dispatched);
|
| void DidFinishTileInitialization(Tile* tile);
|
| void DidTileTreeBinChange(Tile* tile,
|
| TileManagerBin new_tree_bin,
|
| @@ -162,13 +163,9 @@
|
| scoped_ptr<Value> GetMemoryRequirementsAsValue() const;
|
| void AddRequiredTileForActivation(Tile* tile);
|
|
|
| - static void RunImageDecodeTask(
|
| - skia::LazyPixelRef* pixel_ref,
|
| - int layer_id,
|
| - RenderingStatsInstrumentation* stats_instrumentation);
|
| static void RunAnalyzeAndRasterTask(
|
| - const RasterWorkerPool::PictureTask::Callback& analyze_task,
|
| - const RasterWorkerPool::PictureTask::Callback& raster_task,
|
| + const RasterWorkerPool::RasterCallback& analyze_task,
|
| + const RasterWorkerPool::RasterCallback& raster_task,
|
| PicturePileImpl* picture_pile);
|
| static void RunAnalyzeTask(
|
| PicturePileImpl::Analysis* analysis,
|
| @@ -186,11 +183,16 @@
|
| const RasterTaskMetadata& metadata,
|
| RenderingStatsInstrumentation* stats_instrumentation,
|
| PicturePileImpl* picture_pile);
|
| + static void RunImageDecodeTask(
|
| + skia::LazyPixelRef* pixel_ref,
|
| + int layer_id,
|
| + RenderingStatsInstrumentation* stats_instrumentation);
|
|
|
| TileManagerClient* client_;
|
| scoped_ptr<ResourcePool> resource_pool_;
|
| scoped_ptr<RasterWorkerPool> raster_worker_pool_;
|
| bool manage_tiles_pending_;
|
| + int manage_tiles_call_count_;
|
|
|
| GlobalStateThatImpactsTilePriority global_state_;
|
|
|
| @@ -200,8 +202,8 @@
|
| typedef std::set<Tile*> TileSet;
|
| TileSet tiles_that_need_to_be_initialized_for_activation_;
|
|
|
| - typedef base::hash_map<uint32_t, RasterWorkerPool::Task> PixelRefMap;
|
| - PixelRefMap pending_decode_tasks_;
|
| + typedef base::hash_set<uint32_t> PixelRefSet;
|
| + PixelRefSet pending_decode_tasks_;
|
|
|
| typedef std::queue<scoped_refptr<Tile> > TileQueue;
|
| TileQueue tiles_with_pending_upload_;
|
| @@ -215,6 +217,7 @@
|
| bool use_color_estimator_;
|
| bool did_initialize_visible_tile_;
|
|
|
| + size_t pending_tasks_;
|
| size_t max_pending_tasks_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TileManager);
|
|
|