Lines Matching refs:bench
101 Benchmark* bench = nullptr; in next() local
103 while ((bench = this->innerNext()) && in next()
104 (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getUniqueName()) || in next()
105 !bench->isSuitableFor(Benchmark::kGPU_Backend))) { in next()
106 delete bench; in next()
108 return bench; in next()
184 bool init(Benchmark* bench, GrContextFactory* factory, bool useDfText, in init()
189 SkImageInfo info = SkImageInfo::Make(SkTMin(bench->getSize().fX, maxRTSize), in init()
190 SkTMin(bench->getSize().fY, maxRTSize), in init()
419 static double time(int loops, Benchmark* bench, GPUTarget* target, TimingThread* timingThread) { in time() argument
422 bench->preDraw(canvas); in time()
429 bench->draw(loops, canvas); in time()
438 bench->postDraw(canvas); in time()
443 static int setup_gpu_bench(GPUTarget* target, Benchmark* bench, int maxGpuFrameLag) { in setup_gpu_bench() argument
445 int loops = bench->calculateLoops(FLAGS_loops); in setup_gpu_bench()
459 elapsed = time(loops, bench, target, nullptr); in setup_gpu_bench()
476 time(loops, bench, target, nullptr); in setup_gpu_bench()
483 AutoSetupContextBenchAndTarget(Benchmark* bench) : fBenchmark(bench) { in AutoSetupContextBenchAndTarget()
487 SkAssertResult(fTarget.init(bench, fCtxFactory, false, in AutoSetupContextBenchAndTarget()
494 bench->perCanvasPreDraw(fCanvas); in AutoSetupContextBenchAndTarget()
517 int setup_loops(Benchmark* bench) { in setup_loops() argument
518 AutoSetupContextBenchAndTarget ascbt(bench); in setup_loops()
524 pngFilename = SkOSPath::Join(pngFilename.c_str(), bench->getUniqueName()); in setup_loops()
536 Sample time_sample(Benchmark* bench, int loops) { in time_sample() argument
537 AutoSetupContextBenchAndTarget ascbt(bench); in time_sample()
596 SkAutoTDelete<Benchmark> bench(b); in kilobench_main() local
626 sprintf(result, "%d", kilobench::setup_loops(bench)); in kilobench_main()
628 kilobench::Sample sample = kilobench::time_sample(bench, loops); in kilobench_main()
642 loops = kilobench::setup_loops(bench); in kilobench_main()
644 kilobench::Sample sample = kilobench::time_sample(bench, loops); in kilobench_main()
651 printResult(cpuSamples, loops, bench->getUniqueName(), "cpu"); in kilobench_main()
653 printResult(gpuSamples, loops, bench->getUniqueName(), "gpu"); in kilobench_main()