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

Unified Diff: cc/tile_manager.h

Issue 11593030: cc: Add RasterWorkerPool class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win build. Created 7 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/raster_worker_pool.cc ('k') | cc/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_manager.h
diff --git a/cc/tile_manager.h b/cc/tile_manager.h
index dd12c99a344167a70b4bd772f9a775bf0b451841..7496a157eea3abac4e295ca8f747333da68a72f6 100644
--- a/cc/tile_manager.h
+++ b/cc/tile_manager.h
@@ -12,16 +12,15 @@
#include "base/hash_tables.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
+#include "cc/rendering_stats.h"
#include "cc/resource_pool.h"
#include "cc/tile_priority.h"
namespace cc {
-
-class RasterThread;
+class RasterWorkerPool;
class ResourceProvider;
class Tile;
class TileVersion;
-struct RenderingStats;
class CC_EXPORT TileManagerClient {
public:
@@ -80,7 +79,9 @@ class CC_EXPORT TileManager {
size_t num_raster_threads);
virtual ~TileManager();
- const GlobalStateThatImpactsTilePriority& GlobalState() const { return global_state_; }
+ const GlobalStateThatImpactsTilePriority& GlobalState() const {
+ return global_state_;
+ }
void SetGlobalState(const GlobalStateThatImpactsTilePriority& state);
void ManageTiles();
@@ -97,36 +98,34 @@ class CC_EXPORT TileManager {
protected:
// Methods called by Tile
friend class Tile;
- void RegisterTile(Tile*);
- void UnregisterTile(Tile*);
- void WillModifyTilePriority(Tile*, WhichTree, const TilePriority& new_priority);
+ void RegisterTile(Tile* tile);
+ void UnregisterTile(Tile* tile);
+ void WillModifyTilePriority(
+ Tile* tile, WhichTree tree, const TilePriority& new_priority);
private:
void ResetBinCounts();
void AssignGpuMemoryToTiles();
- void FreeResourcesForTile(Tile*);
+ void FreeResourcesForTile(Tile* tile);
void ScheduleManageTiles();
void ScheduleCheckForCompletedSetPixels();
void DispatchMoreTasks();
- void DispatchOneRasterTask(RasterThread*, scoped_refptr<Tile>);
+ void GatherPixelRefsForTile(Tile* tile);
+ void DispatchImageDecodeTasksForTile(Tile* tile);
+ void DispatchOneImageDecodeTask(
+ scoped_refptr<Tile> tile, skia::LazyPixelRef* pixel_ref);
+ void OnImageDecodeTaskCompleted(
+ scoped_refptr<Tile> tile, uint32_t pixel_ref_id);
+ void DispatchOneRasterTask(scoped_refptr<Tile> tile);
void OnRasterTaskCompleted(
- scoped_refptr<Tile>,
- scoped_ptr<ResourcePool::Resource>,
- scoped_refptr<PicturePileImpl>,
- int manage_tiles_call_count_when_dispatched,
- RenderingStats*);
- void DidFinishTileInitialization(Tile*);
- void DispatchImageDecodingTasksForTile(Tile*);
- void OnImageDecodingTaskCompleted(scoped_refptr<Tile>,
- uint32_t,
- RenderingStats*);
- void DispatchOneImageDecodingTask(
- RasterThread*, scoped_refptr<Tile>, skia::LazyPixelRef*);
- void GatherPixelRefsForTile(Tile*);
- RasterThread* GetFreeRasterThread();
+ scoped_refptr<Tile> tile,
+ scoped_ptr<ResourcePool::Resource> resource,
+ int manage_tiles_call_count_when_dispatched);
+ void DidFinishTileInitialization(Tile* tile);
TileManagerClient* client_;
scoped_ptr<ResourcePool> resource_pool_;
+ scoped_ptr<RasterWorkerPool> raster_worker_;
bool manage_tiles_pending_;
int manage_tiles_call_count_;
bool check_for_completed_set_pixels_pending_;
@@ -151,9 +150,6 @@ class CC_EXPORT TileManager {
typedef std::queue<scoped_refptr<Tile> > TileQueue;
TileQueue tiles_with_pending_set_pixels_;
- typedef ScopedPtrVector<RasterThread> RasterThreadVector;
- RasterThreadVector raster_threads_;
-
RenderingStats rendering_stats_;
DISALLOW_COPY_AND_ASSIGN(TileManager);
« no previous file with comments | « cc/raster_worker_pool.cc ('k') | cc/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698