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

Side by Side Diff: tools/VisualBench/VisualInteractiveModule.cpp

Issue 1442643007: Add visualbench option to not reset between samples (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | tools/VisualBench/VisualLightweightBenchModule.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 #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
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 }
OLDNEW
« no previous file with comments | « no previous file | tools/VisualBench/VisualLightweightBenchModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698