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 | 8 |
9 #ifndef VisualBench_DEFINED | 9 #ifndef VisualBench_DEFINED |
10 #define VisualBench_DEFINED | 10 #define VisualBench_DEFINED |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 bool loadPicture(); | 47 bool loadPicture(); |
48 bool advanceRecordIfNecessary(); | 48 bool advanceRecordIfNecessary(); |
49 inline void renderFrame(SkCanvas*); | 49 inline void renderFrame(SkCanvas*); |
50 | 50 |
51 struct Record { | 51 struct Record { |
52 SkString fFilename; | 52 SkString fFilename; |
53 SkTArray<double> fMeasurements; | 53 SkTArray<double> fMeasurements; |
54 }; | 54 }; |
55 | 55 |
56 enum State { | 56 enum State { |
57 kPreWarm_State, | 57 kPreWarmLoops_State, |
| 58 kTuneLoops_State, |
| 59 kPreWarmTiming_State, |
58 kTiming_State, | 60 kTiming_State, |
59 }; | 61 }; |
| 62 void preWarm(State nextState); |
60 | 63 |
61 int fLoop; | |
62 int fCurrentPictureIdx; | 64 int fCurrentPictureIdx; |
63 SkAutoTUnref<SkPicture> fPicture; | 65 SkAutoTUnref<SkPicture> fPicture; |
64 int fCurrentSample; | 66 int fCurrentSample; |
| 67 int fCurrentFrame; |
| 68 int fFlushes; |
| 69 int fLoops; |
65 SkTArray<Record> fRecords; | 70 SkTArray<Record> fRecords; |
66 WallTimer fTimer; | 71 WallTimer fTimer; |
67 State fState; | 72 State fState; |
68 | 73 |
69 // support framework | 74 // support framework |
70 SkAutoTUnref<SkSurface> fSurface; | 75 SkAutoTUnref<SkSurface> fSurface; |
71 SkAutoTUnref<GrContext> fContext; | 76 SkAutoTUnref<GrContext> fContext; |
72 SkAutoTUnref<GrRenderTarget> fRenderTarget; | 77 SkAutoTUnref<GrRenderTarget> fRenderTarget; |
73 AttachmentInfo fAttachmentInfo; | 78 AttachmentInfo fAttachmentInfo; |
74 SkAutoTUnref<const GrGLInterface> fInterface; | 79 SkAutoTUnref<const GrGLInterface> fInterface; |
75 | 80 |
76 typedef SkOSWindow INHERITED; | 81 typedef SkOSWindow INHERITED; |
77 }; | 82 }; |
78 | 83 |
79 #endif | 84 #endif |
OLD | NEW |