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

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

Issue 2017453004: cc: Send notification of tasks completion directly without scheduling. Base URL: https://chromium.googlesource.com/chromium/src.git@worker_origin_split_4
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | cc/tiles/tile_manager.cc » ('j') | cc/tiles/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_TILES_TILE_MANAGER_H_ 5 #ifndef CC_TILES_TILE_MANAGER_H_
6 #define CC_TILES_TILE_MANAGER_H_ 6 #define CC_TILES_TILE_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 MemoryUsage* usage); 261 MemoryUsage* usage);
262 std::unique_ptr<EvictionTilePriorityQueue> 262 std::unique_ptr<EvictionTilePriorityQueue>
263 FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit( 263 FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit(
264 std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue, 264 std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
265 const MemoryUsage& limit, 265 const MemoryUsage& limit,
266 const TilePriority& oother_priority, 266 const TilePriority& oother_priority,
267 MemoryUsage* usage); 267 MemoryUsage* usage);
268 bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority); 268 bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority);
269 bool AreRequiredTilesReadyToDraw(RasterTilePriorityQueue::Type type) const; 269 bool AreRequiredTilesReadyToDraw(RasterTilePriorityQueue::Type type) const;
270 void CheckIfMoreTilesNeedToBePrepared(); 270 void CheckIfMoreTilesNeedToBePrepared();
271 void CheckAndIssueSignals(); 271 void CheckAndNotifyReadyToActivate();
272 void CheckAndNotifyReadyToDraw();
273 void CheckAndNotifyAllTileTasksCompleted();
272 bool MarkTilesOutOfMemory( 274 bool MarkTilesOutOfMemory(
273 std::unique_ptr<RasterTilePriorityQueue> queue) const; 275 std::unique_ptr<RasterTilePriorityQueue> queue) const;
274 276
275 ResourceFormat DetermineResourceFormat(const Tile* tile) const; 277 ResourceFormat DetermineResourceFormat(const Tile* tile) const;
276 bool DetermineResourceRequiresSwizzle(const Tile* tile) const; 278 bool DetermineResourceRequiresSwizzle(const Tile* tile) const;
277 279
278 void DidFinishRunningTileTasksRequiredForActivation(); 280 void DidFinishRunningTileTasksRequiredForActivation();
279 void DidFinishRunningTileTasksRequiredForDraw(); 281 void DidFinishRunningTileTasksRequiredForDraw();
280 void DidFinishRunningAllTileTasks(); 282 void DidFinishRunningAllTileTasks();
281 283
(...skipping 27 matching lines...) Expand all
309 311
310 std::vector<Tile*> released_tiles_; 312 std::vector<Tile*> released_tiles_;
311 313
312 std::vector<scoped_refptr<TileTask>> orphan_tasks_; 314 std::vector<scoped_refptr<TileTask>> orphan_tasks_;
313 315
314 TaskGraph graph_; 316 TaskGraph graph_;
315 scoped_refptr<TileTask> required_for_activation_done_task_; 317 scoped_refptr<TileTask> required_for_activation_done_task_;
316 scoped_refptr<TileTask> required_for_draw_done_task_; 318 scoped_refptr<TileTask> required_for_draw_done_task_;
317 scoped_refptr<TileTask> all_done_task_; 319 scoped_refptr<TileTask> all_done_task_;
318 320
319 UniqueNotifier more_tiles_need_prepare_check_notifier_;
320
321 struct Signals {
322 Signals();
323
324 void reset();
325
326 bool ready_to_activate;
327 bool did_notify_ready_to_activate;
328 bool ready_to_draw;
329 bool did_notify_ready_to_draw;
330 bool all_tile_tasks_completed;
331 bool did_notify_all_tile_tasks_completed;
332 } signals_;
333
334 UniqueNotifier signals_check_notifier_;
335
336 bool has_scheduled_tile_tasks_; 321 bool has_scheduled_tile_tasks_;
337 322
338 uint64_t prepare_tiles_count_; 323 uint64_t prepare_tiles_count_;
339 uint64_t next_tile_id_; 324 uint64_t next_tile_id_;
340 325
341 std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_; 326 std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_;
342 327
343 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; 328 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_;
344 329
345 DISALLOW_COPY_AND_ASSIGN(TileManager); 330 DISALLOW_COPY_AND_ASSIGN(TileManager);
346 }; 331 };
347 332
348 } // namespace cc 333 } // namespace cc
349 334
350 #endif // CC_TILES_TILE_MANAGER_H_ 335 #endif // CC_TILES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/tiles/tile_manager.cc » ('j') | cc/tiles/tile_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698