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

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

Issue 143003012: Revert of cc: Remove WorkerPool class and instead use TaskGraphRunner directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/raster_worker_pool.cc ('k') | cc/resources/raster_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/raster_worker_pool.h" 5 #include "cc/resources/raster_worker_pool.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "cc/test/lap_timer.h" 8 #include "cc/test/lap_timer.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/perf/perf_test.h" 10 #include "testing/perf/perf_test.h"
11 #include "third_party/khronos/GLES2/gl2.h"
12 11
13 namespace cc { 12 namespace cc {
14 13
15 namespace { 14 namespace {
16 15
17 static const int kTimeLimitMillis = 2000; 16 static const int kTimeLimitMillis = 2000;
18 static const int kWarmupRuns = 5; 17 static const int kWarmupRuns = 5;
19 static const int kTimeCheckInterval = 10; 18 static const int kTimeCheckInterval = 10;
20 19
21 class PerfWorkerPoolTaskImpl : public internal::WorkerPoolTask { 20 class PerfWorkerPoolTaskImpl : public internal::WorkerPoolTask {
22 public: 21 public:
23 // Overridden from internal::Task: 22 // Overridden from internal::WorkerPoolTask:
24 virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE {} 23 virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE {}
25
26 // Overridden from internal::WorkerPoolTask:
27 virtual void CompleteOnOriginThread() OVERRIDE {} 24 virtual void CompleteOnOriginThread() OVERRIDE {}
28 25
29 private: 26 private:
30 virtual ~PerfWorkerPoolTaskImpl() {} 27 virtual ~PerfWorkerPoolTaskImpl() {}
31 }; 28 };
32 29
33 class PerfRasterWorkerPool : public RasterWorkerPool { 30 class PerfRasterWorkerPool : public RasterWorkerPool {
34 public: 31 public:
35 PerfRasterWorkerPool() : RasterWorkerPool(NULL, NULL) {} 32 PerfRasterWorkerPool() : RasterWorkerPool(NULL, NULL) {}
36 virtual ~PerfRasterWorkerPool() {} 33 virtual ~PerfRasterWorkerPool() {}
37 34
38 static scoped_ptr<PerfRasterWorkerPool> Create() { 35 static scoped_ptr<PerfRasterWorkerPool> Create() {
39 return make_scoped_ptr(new PerfRasterWorkerPool); 36 return make_scoped_ptr(new PerfRasterWorkerPool);
40 } 37 }
41 38
42 // Overridden from RasterWorkerPool: 39 // Overridden from RasterWorkerPool:
43 virtual void ScheduleTasks(RasterTask::Queue* queue) OVERRIDE { 40 virtual void ScheduleTasks(RasterTask::Queue* queue) OVERRIDE {
44 NOTREACHED(); 41 NOTREACHED();
45 } 42 }
46 virtual unsigned GetResourceTarget() const OVERRIDE { 43 virtual GLenum GetResourceTarget() const OVERRIDE {
47 NOTREACHED(); 44 NOTREACHED();
48 return GL_TEXTURE_2D; 45 return GL_TEXTURE_2D;
49 } 46 }
50 virtual ResourceFormat GetResourceFormat() const OVERRIDE { 47 virtual ResourceFormat GetResourceFormat() const OVERRIDE {
51 NOTREACHED(); 48 NOTREACHED();
52 return RGBA_8888; 49 return RGBA_8888;
53 } 50 }
54 virtual void OnRasterTasksFinished() OVERRIDE { 51 virtual void OnRasterTasksFinished() OVERRIDE {
55 NOTREACHED(); 52 NOTREACHED();
56 } 53 }
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 RunBuildTaskGraphTest("100_4", 100, 4); 217 RunBuildTaskGraphTest("100_4", 100, 4);
221 RunBuildTaskGraphTest("1000_4", 1000, 4); 218 RunBuildTaskGraphTest("1000_4", 1000, 4);
222 RunBuildTaskGraphTest("10_16", 10, 16); 219 RunBuildTaskGraphTest("10_16", 10, 16);
223 RunBuildTaskGraphTest("100_16", 100, 16); 220 RunBuildTaskGraphTest("100_16", 100, 16);
224 RunBuildTaskGraphTest("1000_16", 1000, 16); 221 RunBuildTaskGraphTest("1000_16", 1000, 16);
225 } 222 }
226 223
227 } // namespace 224 } // namespace
228 225
229 } // namespace cc 226 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/raster_worker_pool.cc ('k') | cc/resources/raster_worker_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698