Index: cc/resources/tile_manager.h |
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h |
index 98a66f854ca44adfd654e846cc6194f88c2e614b..3a9431d2971ba1fb18e43fbd9d3d0fa93b706611 100644 |
--- a/cc/resources/tile_manager.h |
+++ b/cc/resources/tile_manager.h |
@@ -14,6 +14,7 @@ |
#include "base/values.h" |
#include "cc/base/ref_counted_managed.h" |
#include "cc/debug/rendering_stats_instrumentation.h" |
+#include "cc/resources/gpu_rasterizer.h" |
#include "cc/resources/managed_tile_state.h" |
#include "cc/resources/memory_history.h" |
#include "cc/resources/picture_pile_impl.h" |
@@ -48,12 +49,14 @@ scoped_ptr<base::Value> RasterTaskCompletionStatsAsValue( |
// by layers; they automatically register with the manager when they are |
// created, and unregister from the manager when they are deleted. |
class CC_EXPORT TileManager : public RasterWorkerPoolClient, |
+ public GpuRasterizerClient, |
public RefCountedManager<Tile>, |
public RefCountedManager<TileBundle> { |
public: |
static scoped_ptr<TileManager> Create( |
TileManagerClient* client, |
ResourceProvider* resource_provider, |
+ ContextProvider* context_provider, |
size_t num_raster_threads, |
RenderingStatsInstrumentation* rendering_stats_instrumentation, |
bool use_map_image, |
@@ -123,9 +126,14 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient, |
} |
} |
+ // GpuRasterizerClient interface |
+ virtual void OnGpuRasterTaskCompleted( |
+ Tile* tile, scoped_ptr<ScopedResource> resource) OVERRIDE; |
+ |
protected: |
TileManager(TileManagerClient* client, |
ResourceProvider* resource_provider, |
+ scoped_ptr<GpuRasterizer> gpu_rasterizer, |
scoped_ptr<RasterWorkerPool> raster_worker_pool, |
size_t num_raster_threads, |
size_t max_raster_usage_bytes, |
@@ -164,6 +172,8 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient, |
TileVector* tiles_that_need_to_be_rasterized); |
void GetTilesWithAssignedBins(PrioritizedTileSet* tiles); |
+ GpuRasterizer* GetGpuRasterizerForTest() { return gpu_rasterizer_.get(); } |
+ |
private: |
void OnImageDecodeTaskCompleted( |
int layer_id, |
@@ -192,6 +202,7 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient, |
TileManagerClient* client_; |
scoped_ptr<ResourcePool> resource_pool_; |
+ scoped_ptr<GpuRasterizer> gpu_rasterizer_; |
scoped_ptr<RasterWorkerPool> raster_worker_pool_; |
GlobalStateThatImpactsTilePriority global_state_; |