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

Side by Side Diff: cc/base/worker_pool.cc

Issue 14061028: cc: Set tile manager memory policy in initializeRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Explicit set to USING_RELEASABLE_MEMORY Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/resources/tile_manager.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/base/worker_pool.h" 5 #include "cc/base/worker_pool.h"
6 6
7 #if defined(OS_ANDROID) 7 #if defined(OS_ANDROID)
8 // TODO(epenner): Move thread priorities to base. (crbug.com/170549) 8 // TODO(epenner): Move thread priorities to base. (crbug.com/170549)
9 #include <sys/resource.h> 9 #include <sys/resource.h>
10 #endif 10 #endif
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 WorkerPool::~WorkerPool() { 310 WorkerPool::~WorkerPool() {
311 // Cancel all pending callbacks. 311 // Cancel all pending callbacks.
312 weak_ptr_factory_.InvalidateWeakPtrs(); 312 weak_ptr_factory_.InvalidateWeakPtrs();
313 313
314 DCHECK_EQ(0u, completed_tasks_.size()); 314 DCHECK_EQ(0u, completed_tasks_.size());
315 } 315 }
316 316
317 void WorkerPool::Shutdown() { 317 void WorkerPool::Shutdown() {
318 inner_->Shutdown(); 318 inner_->Shutdown();
319 inner_->CollectCompletedTasks();
319 DispatchCompletionCallbacks(); 320 DispatchCompletionCallbacks();
320 } 321 }
321 322
322 void WorkerPool::PostTaskAndReply( 323 void WorkerPool::PostTaskAndReply(
323 const Callback& task, const base::Closure& reply) { 324 const Callback& task, const base::Closure& reply) {
324 PostTask(make_scoped_ptr(new WorkerPoolTaskImpl( 325 PostTask(make_scoped_ptr(new WorkerPoolTaskImpl(
325 task, 326 task,
326 reply)).PassAs<internal::WorkerPoolTask>()); 327 reply)).PassAs<internal::WorkerPoolTask>());
327 } 328 }
328 329
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 } 371 }
371 372
372 void WorkerPool::PostTask(scoped_ptr<internal::WorkerPoolTask> task) { 373 void WorkerPool::PostTask(scoped_ptr<internal::WorkerPoolTask> task) {
373 // Schedule check for completed tasks if not pending. 374 // Schedule check for completed tasks if not pending.
374 ScheduleCheckForCompletedTasks(); 375 ScheduleCheckForCompletedTasks();
375 376
376 inner_->PostTask(task.Pass()); 377 inner_->PostTask(task.Pass());
377 } 378 }
378 379
379 } // namespace cc 380 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698