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 #include "nanobenchAndroid.h" | 8 #include "nanobenchAndroid.h" |
9 | 9 |
10 #include "AnimationContext.h" | 10 #include "AnimationContext.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 } | 35 } |
36 | 36 |
37 void HWUITarget::endTiming() { | 37 void HWUITarget::endTiming() { |
38 this->renderer.finishDrawing(); | 38 this->renderer.finishDrawing(); |
39 } | 39 } |
40 | 40 |
41 void HWUITarget::fence() { | 41 void HWUITarget::fence() { |
42 this->renderer.proxy->fence(); | 42 this->renderer.proxy->fence(); |
43 } | 43 } |
44 | 44 |
45 bool HWUITarget::needsFrameTiming() const { | 45 bool HWUITarget::needsFrameTiming(int* frameLag) const { |
| 46 extern int FLAGS_gpuFrameLag; |
| 47 *frameLag = FLAGS_gpuFrameLag; |
46 return true; | 48 return true; |
47 } | 49 } |
48 | 50 |
49 bool HWUITarget::init(SkImageInfo info, Benchmark* bench) { | 51 bool HWUITarget::init(SkImageInfo info, Benchmark* bench) { |
50 this->renderer.initialize({bench->getSize().x(), bench->getSize().y()}); | 52 this->renderer.initialize({bench->getSize().x(), bench->getSize().y()}); |
51 return true; | 53 return true; |
52 } | 54 } |
53 | 55 |
54 bool HWUITarget::capturePixels(SkBitmap* bmp) { | 56 bool HWUITarget::capturePixels(SkBitmap* bmp) { |
55 return this->renderer.capturePixels(bmp); | 57 return this->renderer.capturePixels(bmp); |
56 } | 58 } |
57 | 59 |
58 | 60 |
OLD | NEW |