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

Unified Diff: cc/tile_manager.h

Issue 11453014: Implement the logic to kick off image decoding jobs for TileManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adding more null checks Created 8 years 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 43c9064125097f9a0c5348d9b6ecaba89d4dbbf6..086725f5a8547c5c814fa2226c0eb66ee24bd36b 100644
--- a/cc/tile_manager.h
+++ b/cc/tile_manager.h
@@ -57,6 +57,8 @@ class CC_EXPORT ManagedTileState {
TileManagerBin bin;
TileResolution resolution;
float time_to_needed_in_seconds;
+ bool has_image_decoding_info;
+ std::vector<SkPixelRef*> pending_pixel_refs;
reveman 2012/12/10 17:58:12 Should these be in the persistent state group abov
qinmin 2012/12/10 22:52:51 Done.
};
// This class manages tiles, deciding which should get rasterized and which
@@ -96,6 +98,12 @@ class CC_EXPORT TileManager {
scoped_refptr<PicturePileImpl>,
RenderingStats*);
void DidFinishTileInitialization(Tile*, scoped_ptr<ResourcePool::Resource>);
+ bool HasDispatchedImageDecodingTasks(Tile*);
+ void OnImageDecodingTaskCompleted(scoped_refptr<Tile>, uint32_t);
+ void DispatchOneImageDecodingTask(
+ RasterThread*, scoped_refptr<Tile>, SkPixelRef*);
+ void GetImageInformationForTile(Tile*);
+ RasterThread* GetFreeRasterThread();
TileManagerClient* client_;
scoped_ptr<ResourcePool> resource_pool_;
@@ -106,6 +114,11 @@ class CC_EXPORT TileManager {
typedef std::vector<Tile*> TileVector;
TileVector tiles_;
TileVector tiles_that_need_to_be_rasterized_;
+ // Tiles that are waiting for image decoding tasks.
+ TileVector tiles_waiting_for_image_decoding_;
+
+ typedef base::hash_map<uint32_t, SkPixelRef*> PixelRefMap;
+ PixelRefMap pending_decode_tasks_;
typedef ScopedPtrVector<RasterThread> RasterThreadVector;
RasterThreadVector raster_threads_;

Powered by Google App Engine
This is Rietveld 408576698