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

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

Issue 110883015: Add preliminary support for hw-accelerated tile rasterization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: avoid implementing TestContextProvider::GrContext for now 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"
(...skipping 11 matching lines...) Expand all
22 // Overridden from internal::WorkerPoolTask: 22 // Overridden from internal::WorkerPoolTask:
23 virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE {} 23 virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE {}
24 virtual void CompleteOnOriginThread() OVERRIDE {} 24 virtual void CompleteOnOriginThread() OVERRIDE {}
25 25
26 private: 26 private:
27 virtual ~PerfWorkerPoolTaskImpl() {} 27 virtual ~PerfWorkerPoolTaskImpl() {}
28 }; 28 };
29 29
30 class PerfRasterWorkerPool : public RasterWorkerPool { 30 class PerfRasterWorkerPool : public RasterWorkerPool {
31 public: 31 public:
32 PerfRasterWorkerPool() : RasterWorkerPool(NULL, 1) {} 32 PerfRasterWorkerPool() : RasterWorkerPool(NULL, NULL, 1) {}
33 virtual ~PerfRasterWorkerPool() {} 33 virtual ~PerfRasterWorkerPool() {}
34 34
35 static scoped_ptr<PerfRasterWorkerPool> Create() { 35 static scoped_ptr<PerfRasterWorkerPool> Create() {
36 return make_scoped_ptr(new PerfRasterWorkerPool); 36 return make_scoped_ptr(new PerfRasterWorkerPool);
37 } 37 }
38 38
39 // Overridden from RasterWorkerPool: 39 // Overridden from RasterWorkerPool:
40 virtual void ScheduleTasks(RasterTask::Queue* queue) OVERRIDE { 40 virtual void ScheduleTasks(RasterTask::Queue* queue) OVERRIDE {
41 NOTREACHED(); 41 NOTREACHED();
42 } 42 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 RasterWorkerPool::CreateRasterTask( 165 RasterWorkerPool::CreateRasterTask(
166 NULL, 166 NULL,
167 NULL, 167 NULL,
168 gfx::Rect(), 168 gfx::Rect(),
169 1.0, 169 1.0,
170 HIGH_QUALITY_RASTER_MODE, 170 HIGH_QUALITY_RASTER_MODE,
171 TileResolution(), 171 TileResolution(),
172 1, 172 1,
173 NULL, 173 NULL,
174 1, 174 1,
175 false,
175 NULL, 176 NULL,
176 base::Bind(&RasterWorkerPoolPerfTest::OnRasterTaskCompleted), 177 base::Bind(&RasterWorkerPoolPerfTest::OnRasterTaskCompleted),
177 &decode_tasks), 178 &decode_tasks),
178 false); 179 false);
179 } 180 }
180 } 181 }
181 182
182 void RunBuildTaskGraphTest(const std::string& test_name, 183 void RunBuildTaskGraphTest(const std::string& test_name,
183 unsigned num_raster_tasks, 184 unsigned num_raster_tasks,
184 unsigned num_image_decode_tasks) { 185 unsigned num_image_decode_tasks) {
(...skipping 30 matching lines...) Expand all
215 RunBuildTaskGraphTest("100_4", 100, 4); 216 RunBuildTaskGraphTest("100_4", 100, 4);
216 RunBuildTaskGraphTest("1000_4", 1000, 4); 217 RunBuildTaskGraphTest("1000_4", 1000, 4);
217 RunBuildTaskGraphTest("10_16", 10, 16); 218 RunBuildTaskGraphTest("10_16", 10, 16);
218 RunBuildTaskGraphTest("100_16", 100, 16); 219 RunBuildTaskGraphTest("100_16", 100, 16);
219 RunBuildTaskGraphTest("1000_16", 1000, 16); 220 RunBuildTaskGraphTest("1000_16", 1000, 16);
220 } 221 }
221 222
222 } // namespace 223 } // namespace
223 224
224 } // namespace cc 225 } // 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