Lines Matching refs:bench
133 bool Target::init(SkImageInfo info, Benchmark* bench) { in init() argument
182 bool init(SkImageInfo info, Benchmark* bench) override { in init()
219 static double time(int loops, Benchmark* bench, Target* target) { in time() argument
224 bench->preDraw(canvas); in time()
227 bench->draw(loops, canvas); in time()
233 bench->postDraw(canvas); in time()
301 static int setup_cpu_bench(const double overhead, Target* target, Benchmark* bench) { in setup_cpu_bench() argument
305 int loops = bench->calculateLoops(FLAGS_loops); in setup_cpu_bench()
310 bench->getUniqueName(), HUMANIZE(bench_plus_overhead), HUMANIZE(overhead)); in setup_cpu_bench()
313 bench_plus_overhead = time(1, bench, target); in setup_cpu_bench()
345 static int setup_gpu_bench(Target* target, Benchmark* bench, int maxGpuFrameLag) { in setup_gpu_bench() argument
347 int loops = bench->calculateLoops(FLAGS_loops); in setup_gpu_bench()
361 elapsed = time(loops, bench, target); in setup_gpu_bench()
378 time(loops, bench, target); in setup_gpu_bench()
468 static Target* is_enabled(Benchmark* bench, const Config& config) { in is_enabled() argument
469 if (!bench->isSuitableFor(config.backend)) { in is_enabled()
473 SkImageInfo info = SkImageInfo::Make(bench->getSize().fX, bench->getSize().fY, in is_enabled()
486 target = new HWUITarget(config, bench); in is_enabled()
494 if (!target->init(info, bench)) { in is_enabled()
631 SkAutoTDelete<Benchmark> bench; in next() local
633 bench.reset(this->rawNext()); in next()
634 if (!bench) { in next()
639 return bench.detach(); in next()
644 Benchmark* bench = fBenches->factory()(nullptr); in rawNext() local
648 return bench; in rawNext()
1111 SkAutoTDelete<Benchmark> bench(b); in nanobench_main() local
1112 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getUniqueName())) { in nanobench_main()
1117 log->bench(bench->getUniqueName(), bench->getSize().fX, bench->getSize().fY); in nanobench_main()
1118 bench->delayedSetup(); in nanobench_main()
1137 , bench->getUniqueName() in nanobench_main()
1145 bench->perCanvasPreDraw(canvas); in nanobench_main()
1149 ? setup_gpu_bench(target, bench.get(), maxFrameLag) in nanobench_main()
1150 : setup_cpu_bench(overhead, target, bench.get()); in nanobench_main()
1156 samples.push_back(time(loops, bench, target) / loops); in nanobench_main()
1161 samples[s] = time(loops, bench, target) / loops; in nanobench_main()
1171 bench->getGpuStats(canvas, &keys, &values); in nanobench_main()
1175 bench->perCanvasPostDraw(canvas); in nanobench_main()
1180 pngFilename = SkOSPath::Join(pngFilename.c_str(), bench->getUniqueName()); in nanobench_main()
1193 log->configOption("name", bench->getName()); in nanobench_main()
1219 , bench->getUniqueName() in nanobench_main()
1228 stats.median*1e3, mark, bench->getUniqueName(), config); in nanobench_main()
1242 , bench->getUniqueName() in nanobench_main()
1260 SkDebugf("%s\n", bench->getUniqueName()); in nanobench_main()
1266 log->bench("memory_usage", 0,0); in nanobench_main()