OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef nanobenchAndroid_DEFINED | 8 #ifndef nanobenchAndroid_DEFINED |
9 #define nanobenchAndroid_DEFINED | 9 #define nanobenchAndroid_DEFINED |
10 | 10 |
11 #include "SkAndroidSDKCanvas.h" | 11 #include "SkAndroidSDKCanvas.h" |
12 #include "SkHwuiRenderer.h" | 12 #include "SkHwuiRenderer.h" |
13 | 13 |
14 #include "nanobench.h" | 14 #include "nanobench.h" |
15 | 15 |
16 struct HWUITarget : public Target { | 16 struct HWUITarget : public Target { |
17 explicit HWUITarget(const Config& c, Benchmark* bench); | 17 explicit HWUITarget(const Config& c, Benchmark* bench); |
18 | 18 |
19 SkHwuiRenderer renderer; | 19 SkHwuiRenderer renderer; |
20 SkAndroidSDKCanvas fc; | 20 SkAndroidSDKCanvas fc; |
21 | 21 |
22 void setup() override; | 22 void setup() override; |
23 SkCanvas* beginTiming(SkCanvas* canvas) override; | 23 SkCanvas* beginTiming(SkCanvas* canvas) override; |
24 void endTiming() override; | 24 void endTiming() override; |
25 void fence() override; | 25 void fence() override; |
26 bool needsFrameTiming() const override; | 26 bool needsFrameTiming(int* frameLag) const override; |
27 | 27 |
28 bool init(SkImageInfo info, Benchmark* bench) override; | 28 bool init(SkImageInfo info, Benchmark* bench) override; |
29 bool capturePixels(SkBitmap* bmp) override; | 29 bool capturePixels(SkBitmap* bmp) override; |
30 }; | 30 }; |
31 | 31 |
32 #endif // nanobenchAndroid_DEFINED | 32 #endif // nanobenchAndroid_DEFINED |
OLD | NEW |