Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: tools/VisualBench/VisualStreamTimingModule.h

Issue 1389763003: Create (Closed) Base URL: https://skia.googlesource.com/skia.git@vb3a
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
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;
36 SkAutoTUnref<Benchmark> fBenchmark;
37 bool fHasBeenReset;
38 bool fPreWarmBeforeSample;
39
40 // support framework
41 SkAutoTUnref<VisualBench> fOwner;
42
43 typedef VisualModule INHERITED;
44 };
45
46 #endif
OLDNEW
« no previous file with comments | « tools/VisualBench/VisualLightweightBenchModule.cpp ('k') | tools/VisualBench/VisualStreamTimingModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698