blob: ef28751acaeb6fc2d8fae81bb577d6420ac07949 [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"
tomhudson3c8ceb72015-10-26 07:21:31 -070012#include <utils/TestWindowContext.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
tomhudson3c8ceb72015-10-26 07:21:31 -070019 android::uirenderer::TestWindowContext 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;
cdaltond416a5b2015-06-23 13:23:44 -070026 bool needsFrameTiming(int* frameLag) const override;
tomhudsond968a6f2015-03-26 11:28:06 -070027
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