Lines Matching refs:bench
145 bool Target::init(SkImageInfo info, Benchmark* bench) { in init() argument
192 bool init(SkImageInfo info, Benchmark* bench) override { in init()
194 bench->modifyGrContextOptions(&options); in init()
240 static double time(int loops, Benchmark* bench, Target* target) { in time() argument
245 bench->preDraw(canvas); in time()
248 bench->draw(loops, canvas); in time()
254 bench->postDraw(canvas); in time()
322 static int setup_cpu_bench(const double overhead, Target* target, Benchmark* bench) { in setup_cpu_bench() argument
326 int loops = bench->calculateLoops(FLAGS_loops); in setup_cpu_bench()
331 bench->getUniqueName(), HUMANIZE(bench_plus_overhead), HUMANIZE(overhead)); in setup_cpu_bench()
334 bench_plus_overhead = time(1, bench, target); in setup_cpu_bench()
366 static int setup_gpu_bench(Target* target, Benchmark* bench, int maxGpuFrameLag) { in setup_gpu_bench() argument
368 int loops = bench->calculateLoops(FLAGS_loops); in setup_gpu_bench()
382 elapsed = time(loops, bench, target); in setup_gpu_bench()
398 time(loops, bench, target); in setup_gpu_bench()
524 static Target* is_enabled(Benchmark* bench, const Config& config) { in is_enabled() argument
525 if (!bench->isSuitableFor(config.backend)) { in is_enabled()
529 SkImageInfo info = SkImageInfo::Make(bench->getSize().fX, bench->getSize().fY, in is_enabled()
545 if (!target->init(info, bench)) { in is_enabled()
702 std::unique_ptr<Benchmark> bench; in next() local
704 bench.reset(this->rawNext()); in next()
705 if (!bench) { in next()
710 return bench.release(); in next()
715 Benchmark* bench = fBenches->factory()(nullptr); in rawNext() local
719 return bench; in rawNext()
1235 std::unique_ptr<Benchmark> bench(b); in main() local
1236 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getUniqueName())) { in main()
1241 log->bench(bench->getUniqueName(), bench->getSize().fX, bench->getSize().fY); in main()
1242 bench->delayedSetup(); in main()
1256 , bench->getUniqueName() in main()
1263 TRACE_EVENT2("skia", "Benchmark", "name", TRACE_STR_COPY(bench->getUniqueName()), in main()
1267 bench->perCanvasPreDraw(canvas); in main()
1271 ? setup_gpu_bench(target, bench.get(), maxFrameLag) in main()
1272 : setup_cpu_bench(overhead, target, bench.get()); in main()
1285 time(loops, bench.get(), target); in main()
1293 samples.push_back(time(loops, bench.get(), target) / loops); in main()
1298 samples[s] = time(loops, bench.get(), target) / loops; in main()
1308 bench->getGpuStats(canvas, &keys, &values); in main()
1312 bench->perCanvasPostDraw(canvas); in main()
1317 pngFilename = SkOSPath::Join(pngFilename.c_str(), bench->getUniqueName()); in main()
1324 log->configOption("name", bench->getName()); in main()
1350 , bench->getUniqueName() in main()
1359 stats.median*1e3, mark, bench->getUniqueName(), config); in main()
1369 , bench->getUniqueName() in main()
1385 , bench->getUniqueName() in main()
1400 SkDebugf("%s\n", bench->getUniqueName()); in main()
1408 log->bench("memory_usage", 0,0); in main()