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

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

Issue 671653005: SetNeedsRedraw directly when updating a visible tile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pinchblurmerge-test: has_active_visible_tile_scheduled Created 6 years, 1 month 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
« no previous file with comments | « no previous file | cc/resources/tile_manager.cc » ('j') | cc/resources/tile_manager.cc » ('J')
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 <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 TileManagerClient* client, 97 TileManagerClient* client,
98 base::SequencedTaskRunner* task_runner, 98 base::SequencedTaskRunner* task_runner,
99 ResourcePool* resource_pool, 99 ResourcePool* resource_pool,
100 Rasterizer* rasterizer, 100 Rasterizer* rasterizer,
101 RenderingStatsInstrumentation* rendering_stats_instrumentation, 101 RenderingStatsInstrumentation* rendering_stats_instrumentation,
102 size_t scheduled_raster_task_limit); 102 size_t scheduled_raster_task_limit);
103 ~TileManager() override; 103 ~TileManager() override;
104 104
105 void ManageTiles(const GlobalStateThatImpactsTilePriority& state); 105 void ManageTiles(const GlobalStateThatImpactsTilePriority& state);
106 106
107 // Returns true when visible tiles have been initialized. 107 void UpdateVisibleTiles();
108 bool UpdateVisibleTiles(); 108
109 bool has_active_visible_tile_scheduled() {
reveman 2014/10/30 16:58:17 Not a fan of this. What does it mean to be schedul
danakj 2014/10/30 16:59:53 How would you recommend setting this bool then? Wh
danakj 2014/10/30 17:00:58 What I want is a bool that says "it's likely that
110 return has_active_visible_tile_scheduled_;
111 }
109 112
110 scoped_refptr<Tile> CreateTile(RasterSource* raster_source, 113 scoped_refptr<Tile> CreateTile(RasterSource* raster_source,
111 const gfx::Size& tile_size, 114 const gfx::Size& tile_size,
112 const gfx::Rect& content_rect, 115 const gfx::Rect& content_rect,
113 float contents_scale, 116 float contents_scale,
114 int layer_id, 117 int layer_id,
115 int source_frame_number, 118 int source_frame_number,
116 int flags); 119 int flags);
117 120
118 scoped_refptr<base::debug::ConvertableToTraceFormat> BasicStateAsValue() 121 scoped_refptr<base::debug::ConvertableToTraceFormat> BasicStateAsValue()
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 const size_t scheduled_raster_task_limit_; 244 const size_t scheduled_raster_task_limit_;
242 245
243 typedef base::hash_map<Tile::Id, Tile*> TileMap; 246 typedef base::hash_map<Tile::Id, Tile*> TileMap;
244 TileMap tiles_; 247 TileMap tiles_;
245 248
246 bool all_tiles_that_need_to_be_rasterized_are_scheduled_; 249 bool all_tiles_that_need_to_be_rasterized_are_scheduled_;
247 MemoryHistory::Entry memory_stats_from_last_assign_; 250 MemoryHistory::Entry memory_stats_from_last_assign_;
248 251
249 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 252 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
250 253
251 bool did_initialize_visible_tile_;
252 bool did_check_for_completed_tasks_since_last_schedule_tasks_; 254 bool did_check_for_completed_tasks_since_last_schedule_tasks_;
253 bool did_oom_on_last_assign_; 255 bool did_oom_on_last_assign_;
256 bool has_active_visible_tile_scheduled_;
254 257
255 typedef base::hash_map<uint32_t, scoped_refptr<ImageDecodeTask>> 258 typedef base::hash_map<uint32_t, scoped_refptr<ImageDecodeTask>>
256 PixelRefTaskMap; 259 PixelRefTaskMap;
257 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; 260 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap;
258 LayerPixelRefTaskMap image_decode_tasks_; 261 LayerPixelRefTaskMap image_decode_tasks_;
259 262
260 typedef base::hash_map<int, int> LayerCountMap; 263 typedef base::hash_map<int, int> LayerCountMap;
261 LayerCountMap used_layer_counts_; 264 LayerCountMap used_layer_counts_;
262 265
263 RasterTaskCompletionStats update_visible_tiles_stats_; 266 RasterTaskCompletionStats update_visible_tiles_stats_;
(...skipping 12 matching lines...) Expand all
276 RasterTilePriorityQueue raster_priority_queue_; 279 RasterTilePriorityQueue raster_priority_queue_;
277 EvictionTilePriorityQueue eviction_priority_queue_; 280 EvictionTilePriorityQueue eviction_priority_queue_;
278 bool eviction_priority_queue_is_up_to_date_; 281 bool eviction_priority_queue_is_up_to_date_;
279 282
280 DISALLOW_COPY_AND_ASSIGN(TileManager); 283 DISALLOW_COPY_AND_ASSIGN(TileManager);
281 }; 284 };
282 285
283 } // namespace cc 286 } // namespace cc
284 287
285 #endif // CC_RESOURCES_TILE_MANAGER_H_ 288 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/tile_manager.cc » ('j') | cc/resources/tile_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698