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

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

Issue 1336043003: Add viewer mode to VisualBench. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix init order 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
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 11 matching lines...) Expand all
22 /* 22 /*
23 * This module is designed to be a minimal overhead timing module for VisualBenc h 23 * This module is designed to be a minimal overhead timing module for VisualBenc h
24 */ 24 */
25 class VisualLightweightBenchModule : public VisualModule { 25 class VisualLightweightBenchModule : public VisualModule {
26 public: 26 public:
27 // TODO get rid of backpointer 27 // TODO get rid of backpointer
28 VisualLightweightBenchModule(VisualBench* owner); 28 VisualLightweightBenchModule(VisualBench* owner);
29 29
30 void draw(SkCanvas* canvas) override; 30 void draw(SkCanvas* canvas) override;
31 31
32 bool onHandleChar(SkUnichar c) override;
33
32 private: 34 private:
33 /* 35 /*
34 * The heart of visual bench is an event driven timing loop. 36 * The heart of visual bench is an event driven timing loop.
35 * kPreWarmLoopsPerCanvasPreDraw_State: Before we begin timing, Benchmarks have a hook to 37 * kPreWarmLoopsPerCanvasPreDraw_State: Before we begin timing, Benchmarks have a hook to
36 * access the canvas. Then we prewarm before the autotune 38 * access the canvas. Then we prewarm before the autotune
37 * loops step. 39 * loops step.
38 * kPreWarmLoops_State: We prewarm the gpu before auto tuni ng to enter a steady 40 * kPreWarmLoops_State: We prewarm the gpu before auto tuni ng to enter a steady
39 * work state 41 * work state
40 * kTuneLoops_State: Then we tune the loops of the bench mark to ensure we 42 * kTuneLoops_State: Then we tune the loops of the bench mark to ensure we
41 * are doing a measurable amount of wo rk 43 * are doing a measurable amount of wo rk
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 SkAutoTUnref<Benchmark> fBenchmark; 91 SkAutoTUnref<Benchmark> fBenchmark;
90 92
91 // support framework 93 // support framework
92 SkAutoTUnref<VisualBench> fOwner; 94 SkAutoTUnref<VisualBench> fOwner;
93 SkAutoTDelete<ResultsWriter> fResults; 95 SkAutoTDelete<ResultsWriter> fResults;
94 96
95 typedef VisualModule INHERITED; 97 typedef VisualModule INHERITED;
96 }; 98 };
97 99
98 #endif 100 #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