tomhudson | d968a6f | 2015-03-26 11:28:06 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
tomhudson | d968a6f | 2015-03-26 11:28:06 -0700 | [diff] [blame] | 11 | #include "SkAndroidSDKCanvas.h" |
tomhudson | 3c8ceb7 | 2015-10-26 07:21:31 -0700 | [diff] [blame] | 12 | #include <utils/TestWindowContext.h> |
tomhudson | d968a6f | 2015-03-26 11:28:06 -0700 | [diff] [blame] | 13 | |
| 14 | #include "nanobench.h" |
| 15 | |
| 16 | struct HWUITarget : public Target { |
| 17 | explicit HWUITarget(const Config& c, Benchmark* bench); |
| 18 | |
tomhudson | 3c8ceb7 | 2015-10-26 07:21:31 -0700 | [diff] [blame] | 19 | android::uirenderer::TestWindowContext renderer; |
tomhudson | d968a6f | 2015-03-26 11:28:06 -0700 | [diff] [blame] | 20 | SkAndroidSDKCanvas fc; |
| 21 | |
| 22 | void setup() override; |
| 23 | SkCanvas* beginTiming(SkCanvas* canvas) override; |
| 24 | void endTiming() override; |
| 25 | void fence() override; |
cdalton | d416a5b | 2015-06-23 13:23:44 -0700 | [diff] [blame] | 26 | bool needsFrameTiming(int* frameLag) const override; |
tomhudson | d968a6f | 2015-03-26 11:28:06 -0700 | [diff] [blame] | 27 | |
tomhudson | d968a6f | 2015-03-26 11:28:06 -0700 | [diff] [blame] | 28 | bool init(SkImageInfo info, Benchmark* bench) override; |
| 29 | bool capturePixels(SkBitmap* bmp) override; |
| 30 | }; |
| 31 | |
tomhudson | d968a6f | 2015-03-26 11:28:06 -0700 | [diff] [blame] | 32 | #endif // nanobenchAndroid_DEFINED |