Index: cc/tile_manager.h |
diff --git a/cc/tile_manager.h b/cc/tile_manager.h |
index d5590365d45fae7f57c20ad7c05f43d373daea4c..739fc6a975e4609c0ca2c48ff0b8cdcbbc82517a 100644 |
--- a/cc/tile_manager.h |
+++ b/cc/tile_manager.h |
@@ -16,6 +16,7 @@ |
#include "cc/rendering_stats.h" |
#include "cc/resource_pool.h" |
#include "cc/tile_priority.h" |
+#include "cc/worker_pool.h" |
namespace cc { |
class RasterWorkerPool; |
@@ -26,7 +27,9 @@ class TileVersion; |
class CC_EXPORT TileManagerClient { |
public: |
virtual void ScheduleManageTiles() = 0; |
+ virtual void ScheduleCheckForCompletedRasterTasks() = 0; |
virtual void DidUploadVisibleHighResolutionTile() = 0; |
+ virtual void DidDetectIdleRaster() = 0; |
protected: |
virtual ~TileManagerClient() {} |
@@ -95,7 +98,7 @@ class CC_EXPORT ManagedTileState { |
// 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 { |
+class CC_EXPORT TileManager : public WorkerPoolClient { |
public: |
TileManager(TileManagerClient* client, |
ResourceProvider *resource_provider, |
@@ -109,6 +112,7 @@ class CC_EXPORT TileManager { |
void SetGlobalState(const GlobalStateThatImpactsTilePriority& state); |
void ManageTiles(); |
+ void CheckForCompletedRasterTasks(); |
void CheckForCompletedTileUploads(); |
void AbortPendingTileUploads(); |
@@ -123,6 +127,9 @@ class CC_EXPORT TileManager { |
const MemoryHistory::Entry& memory_stats_from_last_assign() const { return memory_stats_from_last_assign_; } |
+ // Overridden from WorkerPoolClient: |
+ virtual void OnIdle() OVERRIDE; |
+ |
protected: |
// Methods called by Tile |
friend class Tile; |
@@ -205,10 +212,12 @@ class CC_EXPORT TileManager { |
typedef std::queue<scoped_refptr<Tile> > TileQueue; |
TileQueue tiles_with_pending_set_pixels_; |
- size_t bytes_pending_set_pixels_; |
bool ever_exceeded_memory_budget_; |
MemoryHistory::Entry memory_stats_from_last_assign_; |
+ size_t bytes_pending_raster_; |
+ size_t bytes_pending_set_pixels_; |
+ |
bool record_rendering_stats_; |
RenderingStats rendering_stats_; |