Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 9 #ifndef VisualStreamTimingModule_DEFINED | |
| 10 #define VisualStreamTimingModule_DEFINED | |
| 11 | |
| 12 #include "VisualModule.h" | |
| 13 | |
| 14 #include "TimingStateMachine.h" | |
| 15 #include "VisualBench.h" | |
| 16 #include "VisualBenchmarkStream.h" | |
| 17 | |
| 18 /* | |
| 19 * VisualStreamTimingModule is the base class for modules which want to time a s tream of Benchmarks | |
|
robertphillips
2015/10/06 12:19:46
This could use some more documentation. How is it
joshualitt
2015/10/07 19:33:53
Acknowledged.
| |
| 20 */ | |
| 21 class VisualStreamTimingModule : public VisualModule { | |
| 22 public: | |
| 23 VisualStreamTimingModule(VisualBench* owner, bool preWarmBeforeSample); | |
| 24 void draw(SkCanvas* canvas) override; | |
| 25 | |
| 26 private: | |
| 27 virtual void renderFrame(SkCanvas*, Benchmark*, int loops)=0; | |
| 28 | |
| 29 // subclasses should return true to advance the stream | |
| 30 virtual bool timingFinished(Benchmark*, int loops, double measurement)=0; | |
| 31 | |
| 32 bool nextBenchmarkIfNecessary(SkCanvas*); | |
| 33 | |
| 34 TimingStateMachine fTSM; | |
| 35 SkAutoTDelete<VisualBenchmarkStream> fBenchmarkStream; | |
|
robertphillips
2015/10/06 12:19:46
Can the VisualBenchmarkStream not return the curre
joshualitt
2015/10/07 19:33:53
Will fix in a follow on.
| |
| 36 SkAutoTUnref<Benchmark> fBenchmark; | |
|
robertphillips
2015/10/06 12:19:46
// What does 'fHasBeenReset' mean ?
joshualitt
2015/10/07 19:33:53
Acknowledged.
| |
| 37 bool fHasBeenReset; | |
| 38 bool fPreWarmBeforeSample; | |
| 39 | |
| 40 // support framework | |
| 41 SkAutoTUnref<VisualBench> fOwner; | |
| 42 | |
| 43 typedef VisualModule INHERITED; | |
| 44 }; | |
| 45 | |
| 46 #endif | |
| OLD | NEW |