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

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

Issue 1498043002: Create a skeleton VisualDebugModule (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak Created 5 years 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 | « tools/VisualBench/VisualBench.cpp ('k') | tools/VisualBench/VisualBenchmarkStream.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 VisualBenchmarkStream_DEFINED 9 #ifndef VisualBenchmarkStream_DEFINED
10 #define VisualBenchmarkStream_DEFINED 10 #define VisualBenchmarkStream_DEFINED
11 11
12 #include "Benchmark.h" 12 #include "Benchmark.h"
13 #include "gm.h" 13 #include "gm.h"
14 #include "SkCommandLineFlags.h" 14 #include "SkCommandLineFlags.h"
15 #include "SkPicture.h" 15 #include "SkPicture.h"
16 16
17 DECLARE_string(match); 17 DECLARE_string(match);
18 18
19 class VisualBenchmarkStream { 19 class VisualBenchmarkStream {
20 public: 20 public:
21 VisualBenchmarkStream(const SkSurfaceProps&); 21 VisualBenchmarkStream(const SkSurfaceProps&, bool justSKP = false);
22 22
23 static bool ReadPicture(const char* path, SkAutoTUnref<SkPicture>* pic); 23 static bool ReadPicture(const char* path, SkAutoTUnref<SkPicture>* pic);
24 24
25 Benchmark* next(); 25 Benchmark* next();
26 Benchmark* current() { return fBenchmark.get(); } 26 Benchmark* current() { return fBenchmark.get(); }
27 27
28 private: 28 private:
29 Benchmark* innerNext(); 29 Benchmark* innerNext();
30 30
31 SkSurfaceProps fSurfaceProps; 31 SkSurfaceProps fSurfaceProps;
32 const BenchRegistry* fBenches; 32 const BenchRegistry* fBenches;
33 const skiagm::GMRegistry* fGMs; 33 const skiagm::GMRegistry* fGMs;
34 SkTArray<SkString> fSKPs; 34 SkTArray<SkString> fSKPs;
35 SkAutoTUnref<Benchmark> fBenchmark; 35 SkAutoTUnref<Benchmark> fBenchmark;
36 36
37 const char* fSourceType; // What we're benching: bench, GM, SKP, ... 37 const char* fSourceType; // What we're benching: bench, GM, SKP, ...
38 const char* fBenchType; // How we bench it: micro, playback, ... 38 const char* fBenchType; // How we bench it: micro, playback, ...
39 int fCurrentSKP; 39 int fCurrentSKP;
40 bool fIsWarmedUp; 40 bool fIsWarmedUp;
41 }; 41 };
42 42
43 #endif 43 #endif
OLDNEW
« no previous file with comments | « tools/VisualBench/VisualBench.cpp ('k') | tools/VisualBench/VisualBenchmarkStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698