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

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

Issue 2948033005: cc: Drop locked decodes from checker image tracker on cache switch. (Closed)
Patch Set: tested Created 3 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 | « cc/tiles/checker_image_tracker.h ('k') | cc/tiles/tile_manager_unittest.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 #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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 tile_task_manager_->CheckForCompletedTasks(); 396 tile_task_manager_->CheckForCompletedTasks();
397 397
398 tile_task_manager_ = nullptr; 398 tile_task_manager_ = nullptr;
399 resource_pool_ = nullptr; 399 resource_pool_ = nullptr;
400 more_tiles_need_prepare_check_notifier_.Cancel(); 400 more_tiles_need_prepare_check_notifier_.Cancel();
401 signals_check_notifier_.Cancel(); 401 signals_check_notifier_.Cancel();
402 task_set_finished_weak_ptr_factory_.InvalidateWeakPtrs(); 402 task_set_finished_weak_ptr_factory_.InvalidateWeakPtrs();
403 ready_to_draw_callback_weak_ptr_factory_.InvalidateWeakPtrs(); 403 ready_to_draw_callback_weak_ptr_factory_.InvalidateWeakPtrs();
404 raster_buffer_provider_ = nullptr; 404 raster_buffer_provider_ = nullptr;
405 405
406 // Ask the tracker to drop any locked decodes since we will be destroying the
407 // decode cache.
408 bool can_clear_decode_policy_tracking = false;
409 checker_image_tracker_.ClearTracker(can_clear_decode_policy_tracking);
406 image_controller_.SetImageDecodeCache(nullptr); 410 image_controller_.SetImageDecodeCache(nullptr);
407 locked_image_tasks_.clear(); 411 locked_image_tasks_.clear();
408 } 412 }
409 413
410 void TileManager::SetResources(ResourcePool* resource_pool, 414 void TileManager::SetResources(ResourcePool* resource_pool,
411 ImageDecodeCache* image_decode_cache, 415 ImageDecodeCache* image_decode_cache,
412 TaskGraphRunner* task_graph_runner, 416 TaskGraphRunner* task_graph_runner,
413 RasterBufferProvider* raster_buffer_provider, 417 RasterBufferProvider* raster_buffer_provider,
414 size_t scheduled_raster_task_limit, 418 size_t scheduled_raster_task_limit,
415 bool use_gpu_rasterization) { 419 bool use_gpu_rasterization) {
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 all_tile_tasks_completed = false; 1660 all_tile_tasks_completed = false;
1657 did_notify_all_tile_tasks_completed = false; 1661 did_notify_all_tile_tasks_completed = false;
1658 } 1662 }
1659 1663
1660 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default; 1664 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default;
1661 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule( 1665 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule(
1662 PrioritizedWorkToSchedule&& other) = default; 1666 PrioritizedWorkToSchedule&& other) = default;
1663 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default; 1667 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default;
1664 1668
1665 } // namespace cc 1669 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/checker_image_tracker.h ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698