aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/RecordingBench.h
blob: 0a8befe2f1039ba0e2686aa47f9a5ece2017eda4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * Copyright 2014 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef RecordingBench_DEFINED
#define RecordingBench_DEFINED

#include "Benchmark.h"
#include "SkPicture.h"

class RecordingBench : public Benchmark {
public:
    RecordingBench(const char* name, const SkPicture*, bool useBBH);

protected:
    const char* onGetName() override;
    bool isSuitableFor(Backend) override;
    void onDraw(int loops, SkCanvas*) override;
    SkIPoint onGetSize() override;

private:
    SkAutoTUnref<const SkPicture> fSrc;
    SkString fName;
    bool fUseBBH;

    typedef Benchmark INHERITED;
};

#endif//RecordingBench_DEFINED