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

Unified Diff: cc/tile_manager.h

Issue 12185024: cc: Upload cheap tiles synchronously (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebased. 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
« no previous file with comments | « no previous file | 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 4d937c613900e8b1fd5707f97be5e8bcaee17879..bd9614370fa28801ab1fdd7dfb968589b0f1b34f 100644
--- a/cc/tile_manager.h
+++ b/cc/tile_manager.h
@@ -57,10 +57,15 @@ enum TileRasterState {
IDLE_STATE = 0,
WAITING_FOR_RASTER_STATE = 1,
RASTER_STATE = 2,
- SET_PIXELS_STATE = 3,
+ UPLOAD_STATE = 3,
NUM_STATES = 4
};
+enum TileUploadMethod {
+ TILE_UPLOAD_ASYNC = 0,
+ TILE_UPLOAD_SYNC = 1
+};
+
// This is state that is specific to a tile that is
// managed by the TileManager.
class CC_EXPORT ManagedTileState {
@@ -155,7 +160,8 @@ class CC_EXPORT TileManager {
void OnRasterCompleted(
scoped_refptr<Tile> tile,
scoped_ptr<ResourcePool::Resource> resource,
- int manage_tiles_call_count_when_dispatched);
+ int manage_tiles_call_count_when_dispatched,
+ TileUploadMethod upload_method);
void OnRasterTaskCompleted(
scoped_refptr<Tile> tile,
scoped_ptr<ResourcePool::Resource> resource,
@@ -165,6 +171,7 @@ class CC_EXPORT TileManager {
void DidTileBinChange(Tile* tile,
TileManagerBin bin,
WhichTree tree);
+ void DidCompleteTileUpload(Tile* tile);
scoped_ptr<Value> GetMemoryRequirementsAsValue() const;
static void PerformRaster(uint8* buffer,
@@ -200,8 +207,8 @@ class CC_EXPORT TileManager {
PixelRefMap pending_decode_tasks_;
typedef std::queue<scoped_refptr<Tile> > TileQueue;
- TileQueue tiles_with_pending_set_pixels_;
- size_t bytes_pending_set_pixels_;
+ TileQueue tiles_with_pending_upload_;
+ size_t bytes_pending_upload_;
bool ever_exceeded_memory_budget_;
MemoryHistory::Entry memory_stats_from_last_assign_;
« no previous file with comments | « no previous file | cc/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698