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 VisualStreamTimingModule_DEFINED | 8 #ifndef VisualStreamTimingModule_DEFINED |
9 #define VisualStreamTimingModule_DEFINED | 9 #define VisualStreamTimingModule_DEFINED |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 public: | 24 public: |
25 VisualStreamTimingModule(VisualBench* owner, bool preWarmBeforeSample); | 25 VisualStreamTimingModule(VisualBench* owner, bool preWarmBeforeSample); |
26 void draw(SkCanvas* canvas) override; | 26 void draw(SkCanvas* canvas) override; |
27 | 27 |
28 private: | 28 private: |
29 virtual void renderFrame(SkCanvas*, Benchmark*, int loops)=0; | 29 virtual void renderFrame(SkCanvas*, Benchmark*, int loops)=0; |
30 | 30 |
31 // subclasses should return true to advance the stream | 31 // subclasses should return true to advance the stream |
32 virtual bool timingFinished(Benchmark*, int loops, double measurement)=0; | 32 virtual bool timingFinished(Benchmark*, int loops, double measurement)=0; |
33 | 33 |
| 34 bool nextBenchmarkIfNecessary(SkCanvas*); |
| 35 |
34 TimingStateMachine fTSM; | 36 TimingStateMachine fTSM; |
35 SkAutoTDelete<VisualBenchmarkStream> fBenchmarkStream; | 37 SkAutoTDelete<VisualBenchmarkStream> fBenchmarkStream; |
| 38 SkAutoTUnref<Benchmark> fBenchmark; |
36 bool fReinitializeBenchmark; | 39 bool fReinitializeBenchmark; |
37 bool fPreWarmBeforeSample; | 40 bool fPreWarmBeforeSample; |
38 | 41 |
39 // support framework | 42 // support framework |
40 VisualBench* fOwner; | 43 VisualBench* fOwner; |
41 | 44 |
42 typedef VisualModule INHERITED; | 45 typedef VisualModule INHERITED; |
43 }; | 46 }; |
44 | 47 |
45 #endif | 48 #endif |
OLD | NEW |