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 #include "VisualInteractiveModule.h" | 8 #include "VisualInteractiveModule.h" |
9 | 9 |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
11 #include "SkCommandLineFlags.h" | 11 #include "SkCommandLineFlags.h" |
12 #include "SkForceLinking.h" | 12 #include "SkForceLinking.h" |
13 #include "SkImageDecoder.h" | 13 #include "SkImageDecoder.h" |
14 | 14 |
15 __SK_FORCE_IMAGE_DECODER_LINKING; | 15 __SK_FORCE_IMAGE_DECODER_LINKING; |
16 | 16 |
17 VisualInteractiveModule::VisualInteractiveModule(VisualBench* owner) | 17 VisualInteractiveModule::VisualInteractiveModule(VisualBench* owner) |
18 : INHERITED(owner, false) | 18 : INHERITED(owner) |
Chris Dalton
2015/11/13 07:45:01
This is the only change in default behavior.
Sinc
| |
19 , fCurrentMeasurement(0) | 19 , fCurrentMeasurement(0) |
20 , fAdvance(false) { | 20 , fAdvance(false) { |
21 memset(fMeasurements, 0, sizeof(fMeasurements)); | 21 memset(fMeasurements, 0, sizeof(fMeasurements)); |
22 } | 22 } |
23 | 23 |
24 void VisualInteractiveModule::renderFrame(SkCanvas* canvas, Benchmark* benchmark , int loops) { | 24 void VisualInteractiveModule::renderFrame(SkCanvas* canvas, Benchmark* benchmark , int loops) { |
25 benchmark->draw(loops, canvas); | 25 benchmark->draw(loops, canvas); |
26 this->drawStats(canvas); | 26 this->drawStats(canvas); |
27 canvas->flush(); | 27 canvas->flush(); |
28 } | 28 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 return false; | 78 return false; |
79 } | 79 } |
80 | 80 |
81 bool VisualInteractiveModule::onHandleChar(SkUnichar c) { | 81 bool VisualInteractiveModule::onHandleChar(SkUnichar c) { |
82 if (' ' == c) { | 82 if (' ' == c) { |
83 fAdvance = true; | 83 fAdvance = true; |
84 } | 84 } |
85 | 85 |
86 return true; | 86 return true; |
87 } | 87 } |
OLD | NEW |