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

Side by Side Diff: cc/resources/worker_pool_perftest.cc

Issue 73923003: Shared Raster Worker Threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build Error for Mac, macro conflict, moving setter to WorkerPool. Created 6 years, 11 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/resources/worker_pool.cc ('k') | cc/resources/worker_pool_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 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/resources/worker_pool.h" 5 #include "cc/resources/worker_pool.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "cc/base/completion_event.h" 8 #include "cc/base/completion_event.h"
9 #include "cc/test/lap_timer.h" 9 #include "cc/test/lap_timer.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 virtual ~PerfControlWorkerPoolTaskImpl() {} 52 virtual ~PerfControlWorkerPoolTaskImpl() {}
53 53
54 scoped_ptr<CompletionEvent> did_start_; 54 scoped_ptr<CompletionEvent> did_start_;
55 scoped_ptr<CompletionEvent> can_finish_; 55 scoped_ptr<CompletionEvent> can_finish_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(PerfControlWorkerPoolTaskImpl); 57 DISALLOW_COPY_AND_ASSIGN(PerfControlWorkerPoolTaskImpl);
58 }; 58 };
59 59
60 class PerfWorkerPool : public WorkerPool { 60 class PerfWorkerPool : public WorkerPool {
61 public: 61 public:
62 PerfWorkerPool() : WorkerPool(1, "test") {} 62 PerfWorkerPool() : WorkerPool() {}
63 virtual ~PerfWorkerPool() {} 63 virtual ~PerfWorkerPool() {}
64 64
65 static scoped_ptr<PerfWorkerPool> Create() { 65 static scoped_ptr<PerfWorkerPool> Create() {
66 return make_scoped_ptr(new PerfWorkerPool); 66 return make_scoped_ptr(new PerfWorkerPool);
67 } 67 }
68 68
69 void ScheduleTasks(internal::WorkerPoolTask* root_task, 69 void ScheduleTasks(internal::WorkerPoolTask* root_task,
70 internal::WorkerPoolTask* leaf_task, 70 internal::WorkerPoolTask* leaf_task,
71 unsigned max_depth, 71 unsigned max_depth,
72 unsigned num_children_per_node) { 72 unsigned num_children_per_node) {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 RunExecuteTasksTest("2_10", 2, 10); 230 RunExecuteTasksTest("2_10", 2, 10);
231 RunExecuteTasksTest("5_5", 5, 5); 231 RunExecuteTasksTest("5_5", 5, 5);
232 RunExecuteTasksTest("10_2", 10, 2); 232 RunExecuteTasksTest("10_2", 10, 2);
233 RunExecuteTasksTest("1000_1", 1000, 1); 233 RunExecuteTasksTest("1000_1", 1000, 1);
234 RunExecuteTasksTest("10_1", 10, 1); 234 RunExecuteTasksTest("10_1", 10, 1);
235 } 235 }
236 236
237 } // namespace 237 } // namespace
238 238
239 } // namespace cc 239 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/worker_pool.cc ('k') | cc/resources/worker_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698