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

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: fix for win_rel trybot 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
« no previous file with comments | « cc/picture_pile_impl.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 31826aedce7839a77862f3614bbe3766b03df03d..d80e2f1a0b1860441c47e99a947c139821a788a8 100644
--- a/cc/tile_manager.h
+++ b/cc/tile_manager.h
@@ -5,9 +5,11 @@
#ifndef CC_TILE_MANAGER_H_
#define CC_TILE_MANAGER_H_
+#include <list>
#include <queue>
#include <vector>
+#include "base/hash_tables.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "cc/resource_pool.h"
@@ -53,6 +55,8 @@ class CC_EXPORT ManagedTileState {
scoped_ptr<ResourcePool::Resource> resource;
bool resource_is_being_initialized;
bool contents_swizzled;
+ bool need_to_gather_pixel_refs;
+ std::list<skia::LazyPixelRef*> pending_pixel_refs;
// Ephemeral state, valid only during Manage.
TileManagerBin bin;
@@ -91,7 +95,7 @@ class CC_EXPORT TileManager {
void FreeResourcesForTile(Tile*);
void ScheduleManageTiles();
void ScheduleCheckForCompletedSetPixels();
- void DispatchMoreRasterTasks();
+ void DispatchMoreTasks();
void DispatchOneRasterTask(RasterThread*, scoped_refptr<Tile>);
void OnRasterTaskCompleted(
scoped_refptr<Tile>,
@@ -99,6 +103,11 @@ class CC_EXPORT TileManager {
scoped_refptr<PicturePileImpl>,
RenderingStats*);
void DidFinishTileInitialization(Tile*);
+ void DispatchImageDecodingTasksForTile(Tile*);
+ void OnImageDecodingTaskCompleted(scoped_refptr<Tile>, uint32_t);
+ void DispatchOneImageDecodingTask(
+ RasterThread*, scoped_refptr<Tile>, skia::LazyPixelRef*);
+ RasterThread* GetFreeRasterThread();
TileManagerClient* client_;
scoped_ptr<ResourcePool> resource_pool_;
@@ -111,6 +120,14 @@ class CC_EXPORT TileManager {
TileVector tiles_;
TileVector tiles_that_need_to_be_rasterized_;
+ typedef std::list<Tile*> TileList;
+ // Tiles with image decoding tasks. These tiles need to be rasterized
+ // when all the image decoding tasks finish.
+ TileList tiles_with_image_decoding_tasks_;
+
+ typedef base::hash_map<uint32_t, skia::LazyPixelRef*> PixelRefMap;
+ PixelRefMap pending_decode_tasks_;
+
typedef std::queue<scoped_refptr<Tile> > TileQueue;
TileQueue tiles_with_pending_set_pixels_;
« no previous file with comments | « cc/picture_pile_impl.cc ('k') | cc/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698