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

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

Issue 141163019: Re-land: cc: Remove WorkerPool class and instead use TaskGraphRunner directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mode of task_graph_runner.h 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"
11 12
12 namespace cc { 13 namespace cc {
13 14
14 namespace { 15 namespace {
15 16
16 static const int kTimeLimitMillis = 2000; 17 static const int kTimeLimitMillis = 2000;
17 static const int kWarmupRuns = 5; 18 static const int kWarmupRuns = 5;
18 static const int kTimeCheckInterval = 10; 19 static const int kTimeCheckInterval = 10;
19 20
20 class PerfWorkerPoolTaskImpl : public internal::WorkerPoolTask { 21 class PerfWorkerPoolTaskImpl : public internal::WorkerPoolTask {
21 public: 22 public:
23 // Overridden from internal::Task:
24 virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE {}
25
22 // Overridden from internal::WorkerPoolTask: 26 // Overridden from internal::WorkerPoolTask:
23 virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE {}
24 virtual void CompleteOnOriginThread() OVERRIDE {} 27 virtual void CompleteOnOriginThread() OVERRIDE {}
25 28
26 private: 29 private:
27 virtual ~PerfWorkerPoolTaskImpl() {} 30 virtual ~PerfWorkerPoolTaskImpl() {}
28 }; 31 };
29 32
30 class PerfRasterWorkerPool : public RasterWorkerPool { 33 class PerfRasterWorkerPool : public RasterWorkerPool {
31 public: 34 public:
32 PerfRasterWorkerPool() : RasterWorkerPool(NULL, NULL) {} 35 PerfRasterWorkerPool() : RasterWorkerPool(NULL, NULL) {}
33 virtual ~PerfRasterWorkerPool() {} 36 virtual ~PerfRasterWorkerPool() {}
34 37
35 static scoped_ptr<PerfRasterWorkerPool> Create() { 38 static scoped_ptr<PerfRasterWorkerPool> Create() {
36 return make_scoped_ptr(new PerfRasterWorkerPool); 39 return make_scoped_ptr(new PerfRasterWorkerPool);
37 } 40 }
38 41
39 // Overridden from RasterWorkerPool: 42 // Overridden from RasterWorkerPool:
40 virtual void ScheduleTasks(RasterTask::Queue* queue) OVERRIDE { 43 virtual void ScheduleTasks(RasterTask::Queue* queue) OVERRIDE {
41 NOTREACHED(); 44 NOTREACHED();
42 } 45 }
43 virtual GLenum GetResourceTarget() const OVERRIDE { 46 virtual unsigned GetResourceTarget() const OVERRIDE {
44 NOTREACHED(); 47 NOTREACHED();
45 return GL_TEXTURE_2D; 48 return GL_TEXTURE_2D;
46 } 49 }
47 virtual ResourceFormat GetResourceFormat() const OVERRIDE { 50 virtual ResourceFormat GetResourceFormat() const OVERRIDE {
48 NOTREACHED(); 51 NOTREACHED();
49 return RGBA_8888; 52 return RGBA_8888;
50 } 53 }
51 virtual void OnRasterTasksFinished() OVERRIDE { 54 virtual void OnRasterTasksFinished() OVERRIDE {
52 NOTREACHED(); 55 NOTREACHED();
53 } 56 }
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 RunBuildTaskGraphTest("100_4", 100, 4); 220 RunBuildTaskGraphTest("100_4", 100, 4);
218 RunBuildTaskGraphTest("1000_4", 1000, 4); 221 RunBuildTaskGraphTest("1000_4", 1000, 4);
219 RunBuildTaskGraphTest("10_16", 10, 16); 222 RunBuildTaskGraphTest("10_16", 10, 16);
220 RunBuildTaskGraphTest("100_16", 100, 16); 223 RunBuildTaskGraphTest("100_16", 100, 16);
221 RunBuildTaskGraphTest("1000_16", 1000, 16); 224 RunBuildTaskGraphTest("1000_16", 1000, 16);
222 } 225 }
223 226
224 } // namespace 227 } // namespace
225 228
226 } // namespace cc 229 } // 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