| OLD | NEW |
| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 base::saturated_cast<int>(stats.canceled_count)); | 259 base::saturated_cast<int>(stats.canceled_count)); |
| 260 return std::move(state); | 260 return std::move(state); |
| 261 } | 261 } |
| 262 | 262 |
| 263 // static | 263 // static |
| 264 scoped_ptr<TileManager> TileManager::Create( | 264 scoped_ptr<TileManager> TileManager::Create( |
| 265 TileManagerClient* client, | 265 TileManagerClient* client, |
| 266 base::SequencedTaskRunner* task_runner, | 266 base::SequencedTaskRunner* task_runner, |
| 267 size_t scheduled_raster_task_limit, | 267 size_t scheduled_raster_task_limit, |
| 268 bool use_partial_raster) { | 268 bool use_partial_raster) { |
| 269 // TODO(vmpstr): |task_runner| is a raw pointer that is implicitly converted |
| 270 // into a scoped_refptr. Figure out whether to plumb a ref pointer or whether |
| 271 // tile manager can have a non-owning pointer and fix. |
| 269 return make_scoped_ptr(new TileManager( | 272 return make_scoped_ptr(new TileManager( |
| 270 client, task_runner, scheduled_raster_task_limit, use_partial_raster)); | 273 client, task_runner, scheduled_raster_task_limit, use_partial_raster)); |
| 271 } | 274 } |
| 272 | 275 |
| 273 TileManager::TileManager( | 276 TileManager::TileManager(TileManagerClient* client, |
| 274 TileManagerClient* client, | 277 scoped_refptr<base::SequencedTaskRunner> task_runner, |
| 275 const scoped_refptr<base::SequencedTaskRunner>& task_runner, | 278 size_t scheduled_raster_task_limit, |
| 276 size_t scheduled_raster_task_limit, | 279 bool use_partial_raster) |
| 277 bool use_partial_raster) | |
| 278 : client_(client), | 280 : client_(client), |
| 279 task_runner_(task_runner), | 281 task_runner_(std::move(task_runner)), |
| 280 resource_pool_(nullptr), | 282 resource_pool_(nullptr), |
| 281 tile_task_runner_(nullptr), | 283 tile_task_runner_(nullptr), |
| 282 scheduled_raster_task_limit_(scheduled_raster_task_limit), | 284 scheduled_raster_task_limit_(scheduled_raster_task_limit), |
| 283 use_partial_raster_(use_partial_raster), | 285 use_partial_raster_(use_partial_raster), |
| 284 use_gpu_rasterization_(false), | 286 use_gpu_rasterization_(false), |
| 285 all_tiles_that_need_to_be_rasterized_are_scheduled_(true), | 287 all_tiles_that_need_to_be_rasterized_are_scheduled_(true), |
| 286 did_check_for_completed_tasks_since_last_schedule_tasks_(true), | 288 did_check_for_completed_tasks_since_last_schedule_tasks_(true), |
| 287 did_oom_on_last_assign_(false), | 289 did_oom_on_last_assign_(false), |
| 288 more_tiles_need_prepare_check_notifier_( | 290 more_tiles_need_prepare_check_notifier_( |
| 289 task_runner_.get(), | 291 task_runner_.get(), |
| (...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1193 void TileManager::Signals::reset() { | 1195 void TileManager::Signals::reset() { |
| 1194 ready_to_activate = false; | 1196 ready_to_activate = false; |
| 1195 did_notify_ready_to_activate = false; | 1197 did_notify_ready_to_activate = false; |
| 1196 ready_to_draw = false; | 1198 ready_to_draw = false; |
| 1197 did_notify_ready_to_draw = false; | 1199 did_notify_ready_to_draw = false; |
| 1198 all_tile_tasks_completed = false; | 1200 all_tile_tasks_completed = false; |
| 1199 did_notify_all_tile_tasks_completed = false; | 1201 did_notify_all_tile_tasks_completed = false; |
| 1200 } | 1202 } |
| 1201 | 1203 |
| 1202 } // namespace cc | 1204 } // namespace cc |
| OLD | NEW |