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

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

Issue 2365303003: cc: Reorder TileManager shutdown and add debugging information. (Closed)
Patch Set: crash: update Created 4 years, 2 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 | « cc/tiles/image_manager.cc ('k') | no next file » | 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 #include "cc/tiles/tile_manager.h" 5 #include "cc/tiles/tile_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 return; 339 return;
340 340
341 global_state_ = GlobalStateThatImpactsTilePriority(); 341 global_state_ = GlobalStateThatImpactsTilePriority();
342 342
343 // This cancels tasks if possible, finishes pending tasks, and release any 343 // This cancels tasks if possible, finishes pending tasks, and release any
344 // uninitialized resources. 344 // uninitialized resources.
345 tile_task_manager_->Shutdown(); 345 tile_task_manager_->Shutdown();
346 346
347 raster_buffer_provider_->Shutdown(); 347 raster_buffer_provider_->Shutdown();
348 348
349 tile_task_manager_->CheckForCompletedTasks();
350
349 // Now that all tasks have been finished, we can clear any |orphan_tasks_|. 351 // Now that all tasks have been finished, we can clear any |orphan_tasks_|.
350 orphan_tasks_.clear(); 352 orphan_tasks_.clear();
351 353
352 tile_task_manager_->CheckForCompletedTasks();
353
354 FreeResourcesForReleasedTiles(); 354 FreeResourcesForReleasedTiles();
355 CleanUpReleasedTiles(); 355 CleanUpReleasedTiles();
356 356
357 tile_task_manager_ = nullptr; 357 tile_task_manager_ = nullptr;
358 resource_pool_ = nullptr; 358 resource_pool_ = nullptr;
359 more_tiles_need_prepare_check_notifier_.Cancel(); 359 more_tiles_need_prepare_check_notifier_.Cancel();
360 signals_check_notifier_.Cancel(); 360 signals_check_notifier_.Cancel();
361 task_set_finished_weak_ptr_factory_.InvalidateWeakPtrs(); 361 task_set_finished_weak_ptr_factory_.InvalidateWeakPtrs();
362 362
363 image_manager_.SetImageDecodeController(nullptr); 363 image_manager_.SetImageDecodeController(nullptr);
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 all_tile_tasks_completed = false; 1329 all_tile_tasks_completed = false;
1330 did_notify_all_tile_tasks_completed = false; 1330 did_notify_all_tile_tasks_completed = false;
1331 } 1331 }
1332 1332
1333 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default; 1333 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default;
1334 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule( 1334 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule(
1335 PrioritizedWorkToSchedule&& other) = default; 1335 PrioritizedWorkToSchedule&& other) = default;
1336 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default; 1336 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default;
1337 1337
1338 } // namespace cc 1338 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/image_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698