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

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

Issue 157743007: cc: Prevent usage of rasterize on-demand with delegating renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more unit test Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/output/software_renderer.cc ('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 <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // created, and unregister from the manager when they are deleted. 48 // created, and unregister from the manager when they are deleted.
49 class CC_EXPORT TileManager : public RasterWorkerPoolClient, 49 class CC_EXPORT TileManager : public RasterWorkerPoolClient,
50 public RefCountedManager<Tile> { 50 public RefCountedManager<Tile> {
51 public: 51 public:
52 static scoped_ptr<TileManager> Create( 52 static scoped_ptr<TileManager> Create(
53 TileManagerClient* client, 53 TileManagerClient* client,
54 ResourceProvider* resource_provider, 54 ResourceProvider* resource_provider,
55 ContextProvider* context_provider, 55 ContextProvider* context_provider,
56 RenderingStatsInstrumentation* rendering_stats_instrumentation, 56 RenderingStatsInstrumentation* rendering_stats_instrumentation,
57 bool use_map_image, 57 bool use_map_image,
58 bool use_rasterize_on_demand,
58 size_t max_transfer_buffer_usage_bytes, 59 size_t max_transfer_buffer_usage_bytes,
59 size_t max_raster_usage_bytes, 60 size_t max_raster_usage_bytes,
60 unsigned map_image_texture_target); 61 unsigned map_image_texture_target);
61 virtual ~TileManager(); 62 virtual ~TileManager();
62 63
63 void ManageTiles(const GlobalStateThatImpactsTilePriority& state); 64 void ManageTiles(const GlobalStateThatImpactsTilePriority& state);
64 65
65 // Returns true when visible tiles have been initialized. 66 // Returns true when visible tiles have been initialized.
66 bool UpdateVisibleTiles(); 67 bool UpdateVisibleTiles();
67 68
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 global_state_.unused_memory_limit_in_bytes, 114 global_state_.unused_memory_limit_in_bytes,
114 global_state_.num_resources_limit); 115 global_state_.num_resources_limit);
115 } 116 }
116 } 117 }
117 118
118 protected: 119 protected:
119 TileManager(TileManagerClient* client, 120 TileManager(TileManagerClient* client,
120 ResourceProvider* resource_provider, 121 ResourceProvider* resource_provider,
121 scoped_ptr<RasterWorkerPool> raster_worker_pool, 122 scoped_ptr<RasterWorkerPool> raster_worker_pool,
122 size_t max_raster_usage_bytes, 123 size_t max_raster_usage_bytes,
123 RenderingStatsInstrumentation* rendering_stats_instrumentation); 124 RenderingStatsInstrumentation* rendering_stats_instrumentation,
125 bool use_rasterize_on_demand);
124 126
125 // Methods called by Tile 127 // Methods called by Tile
126 friend class Tile; 128 friend class Tile;
127 void DidChangeTilePriority(Tile* tile); 129 void DidChangeTilePriority(Tile* tile);
128 130
129 void CleanUpReleasedTiles(); 131 void CleanUpReleasedTiles();
130 132
131 // Overriden from RefCountedManager<Tile>: 133 // Overriden from RefCountedManager<Tile>:
132 virtual void Release(Tile* tile) OVERRIDE; 134 virtual void Release(Tile* tile) OVERRIDE;
133 135
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; 207 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap;
206 LayerPixelRefTaskMap image_decode_tasks_; 208 LayerPixelRefTaskMap image_decode_tasks_;
207 209
208 typedef base::hash_map<int, int> LayerCountMap; 210 typedef base::hash_map<int, int> LayerCountMap;
209 LayerCountMap used_layer_counts_; 211 LayerCountMap used_layer_counts_;
210 212
211 RasterTaskCompletionStats update_visible_tiles_stats_; 213 RasterTaskCompletionStats update_visible_tiles_stats_;
212 214
213 std::vector<Tile*> released_tiles_; 215 std::vector<Tile*> released_tiles_;
214 216
217 bool use_rasterize_on_demand_;
218
215 DISALLOW_COPY_AND_ASSIGN(TileManager); 219 DISALLOW_COPY_AND_ASSIGN(TileManager);
216 }; 220 };
217 221
218 } // namespace cc 222 } // namespace cc
219 223
220 #endif // CC_RESOURCES_TILE_MANAGER_H_ 224 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698