| 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" | |
| 13 #include "SkImageDecoder.h" | |
| 14 | |
| 15 __SK_FORCE_IMAGE_DECODER_LINKING; | |
| 16 | 12 |
| 17 VisualInteractiveModule::VisualInteractiveModule(VisualBench* owner) | 13 VisualInteractiveModule::VisualInteractiveModule(VisualBench* owner) |
| 18 : INHERITED(owner) | 14 : INHERITED(owner) |
| 19 , fCurrentMeasurement(0) | 15 , fCurrentMeasurement(0) |
| 20 , fAdvance(false) { | 16 , fAdvance(false) { |
| 21 memset(fMeasurements, 0, sizeof(fMeasurements)); | 17 memset(fMeasurements, 0, sizeof(fMeasurements)); |
| 22 } | 18 } |
| 23 | 19 |
| 24 void VisualInteractiveModule::renderFrame(SkCanvas* canvas, Benchmark* benchmark
, int loops) { | 20 void VisualInteractiveModule::renderFrame(SkCanvas* canvas, Benchmark* benchmark
, int loops) { |
| 25 benchmark->draw(loops, canvas); | 21 benchmark->draw(loops, canvas); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 return false; | 74 return false; |
| 79 } | 75 } |
| 80 | 76 |
| 81 bool VisualInteractiveModule::onHandleChar(SkUnichar c) { | 77 bool VisualInteractiveModule::onHandleChar(SkUnichar c) { |
| 82 if (' ' == c) { | 78 if (' ' == c) { |
| 83 fAdvance = true; | 79 fAdvance = true; |
| 84 } | 80 } |
| 85 | 81 |
| 86 return true; | 82 return true; |
| 87 } | 83 } |
| OLD | NEW |