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

Unified Diff: cc/resources/tile_manager.h

Issue 228173002: cc: Separate RasterWorkerPool interface from implementation details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review feedback Created 6 years, 8 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/rasterizer_delegate.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 97b785a087f661dcdced15e0f05e5ba3043b2ea9..ab937bf7b204d11f0e1b737162241e0bd2110044 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -20,12 +20,12 @@
#include "cc/resources/memory_history.h"
#include "cc/resources/picture_pile_impl.h"
#include "cc/resources/prioritized_tile_set.h"
-#include "cc/resources/raster_worker_pool.h"
+#include "cc/resources/rasterizer.h"
#include "cc/resources/resource_pool.h"
#include "cc/resources/tile.h"
namespace cc {
-class RasterWorkerPoolDelegate;
+class RasterizerDelegate;
class ResourceProvider;
class CC_EXPORT TileManagerClient {
@@ -49,7 +49,7 @@ scoped_ptr<base::Value> RasterTaskCompletionStatsAsValue(
// should no longer have any memory assigned to them. Tile objects are "owned"
// 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,
+class CC_EXPORT TileManager : public RasterizerClient,
public RefCountedManager<Tile> {
public:
struct CC_EXPORT PairedPictureLayer {
@@ -109,8 +109,8 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient,
static scoped_ptr<TileManager> Create(
TileManagerClient* client,
ResourceProvider* resource_provider,
- RasterWorkerPool* raster_worker_pool,
- RasterWorkerPool* gpu_raster_worker_pool,
+ Rasterizer* rasterizer,
+ Rasterizer* gpu_rasterizer,
size_t max_raster_usage_bytes,
bool use_rasterize_on_demand,
RenderingStatsInstrumentation* rendering_stats_instrumentation);
@@ -178,8 +178,8 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient,
protected:
TileManager(TileManagerClient* client,
ResourceProvider* resource_provider,
- RasterWorkerPool* raster_worker_pool,
- RasterWorkerPool* gpu_raster_worker_pool,
+ Rasterizer* rasterizer,
+ Rasterizer* gpu_rasterizer,
size_t max_raster_usage_bytes,
bool use_rasterize_on_demand,
RenderingStatsInstrumentation* rendering_stats_instrumentation);
@@ -193,7 +193,7 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient,
// Overriden from RefCountedManager<Tile>:
virtual void Release(Tile* tile) OVERRIDE;
- // Overriden from RasterWorkerPoolClient:
+ // Overriden from RasterizerClient:
virtual bool ShouldForceTasksRequiredForActivationToComplete() const OVERRIDE;
virtual void DidFinishRunningTasks() OVERRIDE;
virtual void DidFinishRunningTasksRequiredForActivation() OVERRIDE;
@@ -210,10 +210,10 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient,
void GetTilesWithAssignedBins(PrioritizedTileSet* tiles);
private:
- enum RasterWorkerPoolType {
- RASTER_WORKER_POOL_TYPE_DEFAULT,
- RASTER_WORKER_POOL_TYPE_GPU,
- NUM_RASTER_WORKER_POOL_TYPES
+ enum RasterizerType {
+ RASTERIZER_TYPE_DEFAULT,
+ RASTERIZER_TYPE_GPU,
+ NUM_RASTERIZER_TYPES
};
void OnImageDecodeTaskCompleted(int layer_id,
@@ -232,16 +232,16 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient,
void FreeResourceForTile(Tile* tile, RasterMode mode);
void FreeResourcesForTile(Tile* tile);
void FreeUnusedResourcesForTile(Tile* tile);
- scoped_refptr<internal::WorkerPoolTask> CreateImageDecodeTask(
+ scoped_refptr<internal::ImageDecodeTask> CreateImageDecodeTask(
Tile* tile,
SkPixelRef* pixel_ref);
- scoped_refptr<internal::RasterWorkerPoolTask> CreateRasterTask(Tile* tile);
+ scoped_refptr<internal::RasterTask> CreateRasterTask(Tile* tile);
scoped_ptr<base::Value> GetMemoryRequirementsAsValue() const;
void UpdatePrioritizedTileSetIfNeeded();
TileManagerClient* client_;
scoped_ptr<ResourcePool> resource_pool_;
- scoped_ptr<RasterWorkerPoolDelegate> raster_worker_pool_delegate_;
+ scoped_ptr<RasterizerDelegate> rasterizer_delegate_;
GlobalStateThatImpactsTilePriority global_state_;
typedef base::hash_map<Tile::Id, Tile*> TileMap;
@@ -268,7 +268,7 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient,
bool did_initialize_visible_tile_;
bool did_check_for_completed_tasks_since_last_schedule_tasks_;
- typedef base::hash_map<uint32_t, scoped_refptr<internal::WorkerPoolTask> >
+ typedef base::hash_map<uint32_t, scoped_refptr<internal::ImageDecodeTask> >
PixelRefTaskMap;
typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap;
LayerPixelRefTaskMap image_decode_tasks_;
@@ -285,9 +285,9 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient,
ResourceFormat resource_format_;
// Queues used when scheduling raster tasks.
- RasterTaskQueue raster_queue_[NUM_RASTER_WORKER_POOL_TYPES];
+ RasterTaskQueue raster_queue_[NUM_RASTERIZER_TYPES];
- std::vector<scoped_refptr<internal::Task> > orphan_raster_tasks_;
+ std::vector<scoped_refptr<internal::RasterTask> > orphan_raster_tasks_;
std::vector<PictureLayerImpl*> layers_;
« no previous file with comments | « cc/resources/rasterizer_delegate.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698