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

Unified Diff: cc/tile_manager.h

Issue 12217105: cc: Check for completed raster tasks at interval. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add DidFinishDispatchingCompletionCallbacks Created 7 years, 10 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
Index: cc/tile_manager.h
diff --git a/cc/tile_manager.h b/cc/tile_manager.h
index d5590365d45fae7f57c20ad7c05f43d373daea4c..104f94a92b38c27acb34e79493fe76d617e1cd1a 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;
@@ -95,7 +96,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,
@@ -121,7 +122,12 @@ class CC_EXPORT TileManager {
void GetRenderingStats(RenderingStats* stats);
bool HasPendingWorkScheduled(WhichTree tree) const;
- const MemoryHistory::Entry& memory_stats_from_last_assign() const { return memory_stats_from_last_assign_; }
+ const MemoryHistory::Entry& memory_stats_from_last_assign() const {
+ return memory_stats_from_last_assign_;
+ }
+
+ // Overridden from WorkerPoolClient:
+ virtual void DidFinishDispatchingCompletionCallbacks() OVERRIDE;
nduca 2013/02/13 10:53:37 Might tweak the name so it has Worker in it so its
reveman 2013/02/13 15:32:58 Now DidFinishDispatchingWorkerPoolCompletionCallba
protected:
// Methods called by Tile
@@ -151,7 +157,8 @@ class CC_EXPORT TileManager {
void DispatchOneImageDecodeTask(
scoped_refptr<Tile> tile, skia::LazyPixelRef* pixel_ref);
void OnImageDecodeTaskCompleted(
- scoped_refptr<Tile> tile, uint32_t pixel_ref_id);
+ scoped_refptr<Tile> tile,
+ uint32_t pixel_ref_id);
bool CanDispatchRasterTask(Tile* tile);
scoped_ptr<ResourcePool::Resource> PrepareTileForRaster(Tile* tile);
void DispatchOneRasterTask(scoped_refptr<Tile> tile);
@@ -203,9 +210,12 @@ class CC_EXPORT TileManager {
typedef base::hash_map<uint32_t, skia::LazyPixelRef*> PixelRefMap;
PixelRefMap pending_decode_tasks_;
+ size_t bytes_pending_raster_;
+
typedef std::queue<scoped_refptr<Tile> > TileQueue;
TileQueue tiles_with_pending_set_pixels_;
size_t bytes_pending_set_pixels_;
+ bool need_shallow_flush_;
bool ever_exceeded_memory_budget_;
MemoryHistory::Entry memory_stats_from_last_assign_;
« no previous file with comments | « cc/raster_worker_pool.cc ('k') | cc/tile_manager.cc » ('j') | cc/tile_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698