blob: 7f6ff441d6a25b2eba279580f0ec08ec6aa95fe2 [file] [log] [blame]
tomhudsond968a6f2015-03-26 11:28:06 -07001/*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef nanobenchAndroid_DEFINED
9#define nanobenchAndroid_DEFINED
10
tomhudsond968a6f2015-03-26 11:28:06 -070011#include "SkAndroidSDKCanvas.h"
tomhudson573ae012015-03-27 12:22:01 -070012#include "SkHwuiRenderer.h"
tomhudsond968a6f2015-03-26 11:28:06 -070013
14#include "nanobench.h"
15
16struct HWUITarget : public Target {
17 explicit HWUITarget(const Config& c, Benchmark* bench);
18
tomhudson573ae012015-03-27 12:22:01 -070019 SkHwuiRenderer renderer;
tomhudsond968a6f2015-03-26 11:28:06 -070020 SkAndroidSDKCanvas fc;
21
22 void setup() override;
23 SkCanvas* beginTiming(SkCanvas* canvas) override;
24 void endTiming() override;
25 void fence() override;
26 bool needsFrameTiming() const override;
27
tomhudsond968a6f2015-03-26 11:28:06 -070028 bool init(SkImageInfo info, Benchmark* bench) override;
29 bool capturePixels(SkBitmap* bmp) override;
30};
31
tomhudsond968a6f2015-03-26 11:28:06 -070032#endif // nanobenchAndroid_DEFINED