| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/task_graph_runner.h" | 5 #include "cc/resources/task_graph_runner.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "cc/base/completion_event.h" | 11 #include "cc/base/completion_event.h" |
| 12 #include "cc/debug/lap_timer.h" | 12 #include "cc/debug/lap_timer.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "testing/perf/perf_test.h" | 14 #include "testing/perf/perf_test.h" |
| 15 | 15 |
| 16 namespace cc { | 16 namespace cc { |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 static const int kTimeLimitMillis = 2000; | 19 static const int kTimeLimitMillis = 2000; |
| 20 static const int kWarmupRuns = 5; | 20 static const int kWarmupRuns = 5; |
| 21 static const int kTimeCheckInterval = 10; | 21 static const int kTimeCheckInterval = 10; |
| 22 | 22 |
| 23 class PerfTaskImpl : public Task { | 23 class PerfTaskImpl : public Task { |
| 24 public: | 24 public: |
| 25 typedef std::vector<scoped_refptr<PerfTaskImpl> > Vector; | 25 typedef std::vector<scoped_refptr<PerfTaskImpl>> Vector; |
| 26 | 26 |
| 27 PerfTaskImpl() {} | 27 PerfTaskImpl() {} |
| 28 | 28 |
| 29 // Overridden from Task: | 29 // Overridden from Task: |
| 30 virtual void RunOnWorkerThread() override {} | 30 virtual void RunOnWorkerThread() override {} |
| 31 | 31 |
| 32 void Reset() { did_run_ = false; } | 32 void Reset() { did_run_ = false; } |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 virtual ~PerfTaskImpl() {} | 35 virtual ~PerfTaskImpl() {} |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 RunScheduleAndExecuteTasksTest("0_1_0", 0, 1, 0); | 309 RunScheduleAndExecuteTasksTest("0_1_0", 0, 1, 0); |
| 310 RunScheduleAndExecuteTasksTest("0_32_0", 0, 32, 0); | 310 RunScheduleAndExecuteTasksTest("0_32_0", 0, 32, 0); |
| 311 RunScheduleAndExecuteTasksTest("2_1_0", 2, 1, 0); | 311 RunScheduleAndExecuteTasksTest("2_1_0", 2, 1, 0); |
| 312 RunScheduleAndExecuteTasksTest("2_32_0", 2, 32, 0); | 312 RunScheduleAndExecuteTasksTest("2_32_0", 2, 32, 0); |
| 313 RunScheduleAndExecuteTasksTest("2_1_1", 2, 1, 1); | 313 RunScheduleAndExecuteTasksTest("2_1_1", 2, 1, 1); |
| 314 RunScheduleAndExecuteTasksTest("2_32_1", 2, 32, 1); | 314 RunScheduleAndExecuteTasksTest("2_32_1", 2, 32, 1); |
| 315 } | 315 } |
| 316 | 316 |
| 317 } // namespace | 317 } // namespace |
| 318 } // namespace cc | 318 } // namespace cc |
| OLD | NEW |