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

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: addressing comments 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..7f66d284264efcd7fc8a5082a0f27d202f2bc2c1 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;
};
// 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 HasUndecodedImages(Tile*, std::vector<SkPixelRef*>&);
+ void OnImageDecodingTaskCompleted(uint32_t pixel_ref_id);
+ void DispatchOneImageDecodingTask(RasterThread*, SkPixelRef*);
+ void DispatchMoreImageDecodingTasks(std::vector<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