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

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

Issue 1363663004: stop scaling loops and improve warmup bench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: transparent Created 5 years, 3 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
« no previous file with comments | « bench/RectBench.cpp ('k') | tools/VisualBench/VisualLightweightBenchModule.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 VisualLightweightBenchModule_DEFINED 9 #ifndef VisualLightweightBenchModule_DEFINED
10 #define VisualLightweightBenchModule_DEFINED 10 #define VisualLightweightBenchModule_DEFINED
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 }; 64 };
65 void setTitle(); 65 void setTitle();
66 bool setupBackend(); 66 bool setupBackend();
67 void setupRenderTarget(); 67 void setupRenderTarget();
68 void printStats(); 68 void printStats();
69 bool advanceRecordIfNecessary(SkCanvas*); 69 bool advanceRecordIfNecessary(SkCanvas*);
70 inline void renderFrame(SkCanvas*); 70 inline void renderFrame(SkCanvas*);
71 inline void nextState(State); 71 inline void nextState(State);
72 void perCanvasPreDraw(SkCanvas*, State); 72 void perCanvasPreDraw(SkCanvas*, State);
73 void preWarm(State nextState); 73 void preWarm(State nextState);
74 void scaleLoops(double elapsedMs);
75 inline void tuneLoops(); 74 inline void tuneLoops();
76 inline void timing(SkCanvas*); 75 inline void timing(SkCanvas*);
77 inline double elapsed(); 76 inline double elapsed();
78 void resetTimingState(); 77 void resetTimingState();
79 void postDraw(SkCanvas*); 78 void postDraw(SkCanvas*);
80 void recordMeasurement(); 79 void recordMeasurement();
81 void warmup(SkCanvas* canvas); 80 void warmup(SkCanvas* canvas);
82 81
83 struct Record { 82 struct Record {
84 SkTArray<double> fMeasurements; 83 SkTArray<double> fMeasurements;
85 }; 84 };
86 85
87 int fCurrentSample; 86 int fCurrentSample;
88 int fCurrentFrame; 87 int fCurrentFrame;
89 int fLoops; 88 int fLoops;
90 SkTArray<Record> fRecords; 89 SkTArray<Record> fRecords;
91 WallTimer fTimer; 90 WallTimer fTimer;
92 State fState; 91 State fState;
93 SkAutoTDelete<VisualBenchmarkStream> fBenchmarkStream; 92 SkAutoTDelete<VisualBenchmarkStream> fBenchmarkStream;
94 SkAutoTUnref<Benchmark> fBenchmark; 93 SkAutoTUnref<Benchmark> fBenchmark;
95 94
96 // support framework 95 // support framework
97 SkAutoTUnref<VisualBench> fOwner; 96 SkAutoTUnref<VisualBench> fOwner;
98 SkAutoTDelete<ResultsWriter> fResults; 97 SkAutoTDelete<ResultsWriter> fResults;
99 98
100 typedef VisualModule INHERITED; 99 typedef VisualModule INHERITED;
101 }; 100 };
102 101
103 #endif 102 #endif
OLDNEW
« no previous file with comments | « bench/RectBench.cpp ('k') | tools/VisualBench/VisualLightweightBenchModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698