2 * Copyright 2014 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
7 #ifndef GMBench_DEFINED
8 #define GMBench_DEFINED
10 #include "Benchmark.h"
15 * Runs a GM as a benchmark by repeatedly drawing the GM.
17 class GMBench : public Benchmark {
19 // Constructor takes ownership of the GM param.
20 GMBench(skiagm::GM* gm);
24 virtual const char* onGetName() SK_OVERRIDE;
25 virtual bool isSuitableFor(Backend backend) SK_OVERRIDE;
26 virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE;
27 virtual SkIPoint onGetSize() SK_OVERRIDE;
32 typedef Benchmark INHERITED;