2014-09-10 19:19:30 +00:00
|
|
|
/*
|
|
|
|
* 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:
|
2015-03-26 01:17:31 +00:00
|
|
|
const char* onGetName() override;
|
|
|
|
bool isSuitableFor(Backend) override;
|
|
|
|
void onDraw(const int loops, SkCanvas*) override;
|
|
|
|
SkIPoint onGetSize() override;
|
2014-09-10 19:19:30 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
SkAutoTUnref<const SkPicture> fSrc;
|
|
|
|
SkString fName;
|
|
|
|
bool fUseBBH;
|
|
|
|
|
|
|
|
typedef Benchmark INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif//RecordingBench_DEFINED
|