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

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

Issue 2018603003: Remove VisualBench and its Android implementation. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 #ifndef VisualLightweightBenchModule_DEFINED
9 #define VisualLightweightBenchModule_DEFINED
10
11 #include "VisualStreamTimingModule.h"
12
13 #include "ResultsWriter.h"
14 #include "SkPicture.h"
15 #include "VisualBench.h"
16
17 class SkCanvas;
18
19 /*
20 * This module is designed to be a minimal overhead timing module for VisualBenc h
21 */
22 class VisualLightweightBenchModule : public VisualStreamTimingModule {
23 public:
24 // TODO get rid of backpointer
25 VisualLightweightBenchModule(VisualBench* owner);
26
27 bool onHandleChar(SkUnichar c) override;
28
29 private:
30 void renderFrame(SkCanvas*, Benchmark*, int loops) override;
31 bool timingFinished(Benchmark*, int loops, double measurement) override;
32 void printStats(Benchmark*, int loops);
33
34 struct Record {
35 SkTArray<double> fMeasurements;
36 };
37 int fCurrentSample;
38 SkTArray<Record> fRecords;
39
40 // support framework
41 SkAutoTDelete<ResultsWriter> fResults;
42
43 typedef VisualStreamTimingModule INHERITED;
44 };
45
46 #endif
OLDNEW
« no previous file with comments | « tools/VisualBench/VisualInteractiveModule.cpp ('k') | tools/VisualBench/VisualLightweightBenchModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698