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

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

Issue 1803863003: cc: Remove some unnecessary const scoped_refptr&. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/tile_manager.h ('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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 base::saturated_cast<int>(stats.canceled_count)); 261 base::saturated_cast<int>(stats.canceled_count));
262 return std::move(state); 262 return std::move(state);
263 } 263 }
264 264
265 // static 265 // static
266 scoped_ptr<TileManager> TileManager::Create( 266 scoped_ptr<TileManager> TileManager::Create(
267 TileManagerClient* client, 267 TileManagerClient* client,
268 base::SequencedTaskRunner* task_runner, 268 base::SequencedTaskRunner* task_runner,
269 size_t scheduled_raster_task_limit, 269 size_t scheduled_raster_task_limit,
270 bool use_partial_raster) { 270 bool use_partial_raster) {
271 // TODO(vmpstr): |task_runner| is a raw pointer that is implicitly converted
272 // into a scoped_refptr. Figure out whether to plumb a ref pointer or whether
273 // tile manager can have a non-owning pointer and fix.
271 return make_scoped_ptr(new TileManager( 274 return make_scoped_ptr(new TileManager(
272 client, task_runner, scheduled_raster_task_limit, use_partial_raster)); 275 client, task_runner, scheduled_raster_task_limit, use_partial_raster));
273 } 276 }
274 277
275 TileManager::TileManager( 278 TileManager::TileManager(TileManagerClient* client,
276 TileManagerClient* client, 279 scoped_refptr<base::SequencedTaskRunner> task_runner,
277 const scoped_refptr<base::SequencedTaskRunner>& task_runner, 280 size_t scheduled_raster_task_limit,
278 size_t scheduled_raster_task_limit, 281 bool use_partial_raster)
279 bool use_partial_raster)
280 : client_(client), 282 : client_(client),
281 task_runner_(task_runner), 283 task_runner_(std::move(task_runner)),
282 resource_pool_(nullptr), 284 resource_pool_(nullptr),
283 tile_task_runner_(nullptr), 285 tile_task_runner_(nullptr),
284 scheduled_raster_task_limit_(scheduled_raster_task_limit), 286 scheduled_raster_task_limit_(scheduled_raster_task_limit),
285 use_partial_raster_(use_partial_raster), 287 use_partial_raster_(use_partial_raster),
286 use_gpu_rasterization_(false), 288 use_gpu_rasterization_(false),
287 all_tiles_that_need_to_be_rasterized_are_scheduled_(true), 289 all_tiles_that_need_to_be_rasterized_are_scheduled_(true),
288 did_check_for_completed_tasks_since_last_schedule_tasks_(true), 290 did_check_for_completed_tasks_since_last_schedule_tasks_(true),
289 did_oom_on_last_assign_(false), 291 did_oom_on_last_assign_(false),
290 more_tiles_need_prepare_check_notifier_( 292 more_tiles_need_prepare_check_notifier_(
291 task_runner_.get(), 293 task_runner_.get(),
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 void TileManager::Signals::reset() { 1204 void TileManager::Signals::reset() {
1203 ready_to_activate = false; 1205 ready_to_activate = false;
1204 did_notify_ready_to_activate = false; 1206 did_notify_ready_to_activate = false;
1205 ready_to_draw = false; 1207 ready_to_draw = false;
1206 did_notify_ready_to_draw = false; 1208 did_notify_ready_to_draw = false;
1207 all_tile_tasks_completed = false; 1209 all_tile_tasks_completed = false;
1208 did_notify_all_tile_tasks_completed = false; 1210 did_notify_all_tile_tasks_completed = false;
1209 } 1211 }
1210 1212
1211 } // namespace cc 1213 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698