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

Side by Side Diff: cc/tile_manager.h

Issue 12321053: cc: Complete pending tile uploads if they are needed for tree activation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only flush when not in smoothness/animations Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TILE_MANAGER_H_ 5 #ifndef CC_TILE_MANAGER_H_
6 #define CC_TILE_MANAGER_H_ 6 #define CC_TILE_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 NUM_BIN_PRIORITIES = 2 54 NUM_BIN_PRIORITIES = 2
55 }; 55 };
56 scoped_ptr<base::Value> TileManagerBinPriorityAsValue( 56 scoped_ptr<base::Value> TileManagerBinPriorityAsValue(
57 TileManagerBinPriority bin); 57 TileManagerBinPriority bin);
58 58
59 enum TileRasterState { 59 enum TileRasterState {
60 IDLE_STATE = 0, 60 IDLE_STATE = 0,
61 WAITING_FOR_RASTER_STATE = 1, 61 WAITING_FOR_RASTER_STATE = 1,
62 RASTER_STATE = 2, 62 RASTER_STATE = 2,
63 UPLOAD_STATE = 3, 63 UPLOAD_STATE = 3,
64 NUM_STATES = 4 64 UPLOAD_FLUSHED_STATE = 4,
65 NUM_STATES = 5
65 }; 66 };
66 scoped_ptr<base::Value> TileRasterStateAsValue( 67 scoped_ptr<base::Value> TileRasterStateAsValue(
67 TileRasterState bin); 68 TileRasterState bin);
68 69
69 // This is state that is specific to a tile that is 70 // This is state that is specific to a tile that is
70 // managed by the TileManager. 71 // managed by the TileManager.
71 class CC_EXPORT ManagedTileState { 72 class CC_EXPORT ManagedTileState {
72 public: 73 public:
73 ManagedTileState(); 74 ManagedTileState();
74 ~ManagedTileState(); 75 ~ManagedTileState();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 virtual ~TileManager(); 113 virtual ~TileManager();
113 114
114 const GlobalStateThatImpactsTilePriority& GlobalState() const { 115 const GlobalStateThatImpactsTilePriority& GlobalState() const {
115 return global_state_; 116 return global_state_;
116 } 117 }
117 void SetGlobalState(const GlobalStateThatImpactsTilePriority& state); 118 void SetGlobalState(const GlobalStateThatImpactsTilePriority& state);
118 119
119 void ManageTiles(); 120 void ManageTiles();
120 void CheckForCompletedTileUploads(); 121 void CheckForCompletedTileUploads();
121 void AbortPendingTileUploads(); 122 void AbortPendingTileUploads();
123 void FlushPendingTileUploadIfNeeded(Tile* tile);
122 void DidCompleteFrame(); 124 void DidCompleteFrame();
123 125
124 scoped_ptr<base::Value> BasicStateAsValue() const; 126 scoped_ptr<base::Value> BasicStateAsValue() const;
125 scoped_ptr<base::Value> AllTilesAsValue() const; 127 scoped_ptr<base::Value> AllTilesAsValue() const;
126 void GetMemoryStats(size_t* memoryRequiredBytes, 128 void GetMemoryStats(size_t* memoryRequiredBytes,
127 size_t* memoryNiceToHaveBytes, 129 size_t* memoryNiceToHaveBytes,
128 size_t* memoryUsedBytes) const; 130 size_t* memoryUsedBytes) const;
129 void SetRecordRenderingStats(bool record_rendering_stats); 131 void SetRecordRenderingStats(bool record_rendering_stats);
130 void GetRenderingStats(RenderingStats* stats); 132 void GetRenderingStats(RenderingStats* stats);
131 bool HasPendingWorkScheduled(WhichTree tree) const; 133 bool HasPendingWorkScheduled(WhichTree tree) const;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 bool allow_cheap_tasks_; 250 bool allow_cheap_tasks_;
249 int raster_state_count_[NUM_STATES][NUM_TREES][NUM_BINS]; 251 int raster_state_count_[NUM_STATES][NUM_TREES][NUM_BINS];
250 bool prediction_benchmarking_; 252 bool prediction_benchmarking_;
251 253
252 DISALLOW_COPY_AND_ASSIGN(TileManager); 254 DISALLOW_COPY_AND_ASSIGN(TileManager);
253 }; 255 };
254 256
255 } // namespace cc 257 } // namespace cc
256 258
257 #endif // CC_TILE_MANAGER_H_ 259 #endif // CC_TILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698