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

Side by Side Diff: cc/resources/tile_manager.h

Issue 13051003: cpplint.py pass on cc/(base|debug|quads|resources)/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix prioritized_resource_unittest 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
« no previous file with comments | « cc/resources/tile.h ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_RESOURCES_TILE_MANAGER_H_ 5 #ifndef CC_RESOURCES_TILE_MANAGER_H_
6 #define CC_RESOURCES_TILE_MANAGER_H_ 6 #define CC_RESOURCES_TILE_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 20 matching lines...) Expand all
31 virtual void ScheduleManageTiles() = 0; 31 virtual void ScheduleManageTiles() = 0;
32 virtual void DidInitializeVisibleTile() = 0; 32 virtual void DidInitializeVisibleTile() = 0;
33 33
34 protected: 34 protected:
35 virtual ~TileManagerClient() {} 35 virtual ~TileManagerClient() {}
36 }; 36 };
37 37
38 // Tile manager classifying tiles into a few basic 38 // Tile manager classifying tiles into a few basic
39 // bins: 39 // bins:
40 enum TileManagerBin { 40 enum TileManagerBin {
41 NOW_BIN = 0, // Needed ASAP. 41 NOW_BIN = 0, // Needed ASAP.
42 SOON_BIN = 1, // Impl-side version of prepainting. 42 SOON_BIN = 1, // Impl-side version of prepainting.
43 EVENTUALLY_BIN = 2, // Nice to have, if we've got memory and time. 43 EVENTUALLY_BIN = 2, // Nice to have, if we've got memory and time.
44 NEVER_BIN = 3, // Dont bother. 44 NEVER_BIN = 3, // Dont bother.
45 NUM_BINS = 4 45 NUM_BINS = 4
46 // Be sure to update TileManagerBinAsValue when adding new fields. 46 // Be sure to update TileManagerBinAsValue when adding new fields.
47 }; 47 };
48 scoped_ptr<base::Value> TileManagerBinAsValue( 48 scoped_ptr<base::Value> TileManagerBinAsValue(
49 TileManagerBin bin); 49 TileManagerBin bin);
50 50
51 enum TileManagerBinPriority { 51 enum TileManagerBinPriority {
52 HIGH_PRIORITY_BIN = 0, 52 HIGH_PRIORITY_BIN = 0,
53 LOW_PRIORITY_BIN = 1, 53 LOW_PRIORITY_BIN = 1,
54 NUM_BIN_PRIORITIES = 2 54 NUM_BIN_PRIORITIES = 2
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void RegisterTile(Tile* tile); 113 void RegisterTile(Tile* tile);
114 void UnregisterTile(Tile* tile); 114 void UnregisterTile(Tile* tile);
115 void WillModifyTilePriority( 115 void WillModifyTilePriority(
116 Tile* tile, WhichTree tree, const TilePriority& new_priority) { 116 Tile* tile, WhichTree tree, const TilePriority& new_priority) {
117 // TODO(nduca): Do something smarter if reprioritization turns out to be 117 // TODO(nduca): Do something smarter if reprioritization turns out to be
118 // costly. 118 // costly.
119 ScheduleManageTiles(); 119 ScheduleManageTiles();
120 } 120 }
121 121
122 private: 122 private:
123
124 // Data that is passed to raster tasks. 123 // Data that is passed to raster tasks.
125 struct RasterTaskMetadata { 124 struct RasterTaskMetadata {
126 bool prediction_benchmarking; 125 bool prediction_benchmarking;
127 bool is_tile_in_pending_tree_now_bin; 126 bool is_tile_in_pending_tree_now_bin;
128 TileResolution tile_resolution; 127 TileResolution tile_resolution;
129 int layer_id; 128 int layer_id;
130 }; 129 };
131 130
132 RasterTaskMetadata GetRasterTaskMetadata(const Tile& tile) const; 131 RasterTaskMetadata GetRasterTaskMetadata(const Tile& tile) const;
133 132
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 size_t max_pending_tasks_; 222 size_t max_pending_tasks_;
224 223
225 base::TimeTicks anticipated_draw_time_; 224 base::TimeTicks anticipated_draw_time_;
226 225
227 DISALLOW_COPY_AND_ASSIGN(TileManager); 226 DISALLOW_COPY_AND_ASSIGN(TileManager);
228 }; 227 };
229 228
230 } // namespace cc 229 } // namespace cc
231 230
232 #endif // CC_RESOURCES_TILE_MANAGER_H_ 231 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/resources/tile.h ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698