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

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

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
« no previous file with comments | « tools/VisualBench/VisualLightweightBenchModule.h ('k') | tools/VisualBench/VisualModule.h » ('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 8
9 #include "VisualLightweightBenchModule.h" 9 #include "VisualLightweightBenchModule.h"
10 10
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 bool VisualLightweightBenchModule::advanceRecordIfNecessary(SkCanvas* canvas) { 120 bool VisualLightweightBenchModule::advanceRecordIfNecessary(SkCanvas* canvas) {
121 if (fBenchmark) { 121 if (fBenchmark) {
122 return true; 122 return true;
123 } 123 }
124 124
125 fBenchmark.reset(fBenchmarkStream->next()); 125 fBenchmark.reset(fBenchmarkStream->next());
126 if (!fBenchmark) { 126 if (!fBenchmark) {
127 return false; 127 return false;
128 } 128 }
129 129
130 canvas->clear(0xffffffff); 130 fOwner->clear(canvas, SK_ColorWHITE, 2);
131
132
131 fBenchmark->preDraw(); 133 fBenchmark->preDraw();
132 fRecords.push_back(); 134 fRecords.push_back();
133 135
134 // Log bench name 136 // Log bench name
135 fResults->bench(fBenchmark->getUniqueName(), fBenchmark->getSize().fX, 137 fResults->bench(fBenchmark->getUniqueName(), fBenchmark->getSize().fX,
136 fBenchmark->getSize().fY); 138 fBenchmark->getSize().fY);
137 return true; 139 return true;
138 } 140 }
139 141
140 inline void VisualLightweightBenchModule::nextState(State nextState) { 142 inline void VisualLightweightBenchModule::nextState(State nextState) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 this->postDraw(canvas); 249 this->postDraw(canvas);
248 this->nextState(kPreWarmLoopsPerCanvasPreDraw_State); 250 this->nextState(kPreWarmLoopsPerCanvasPreDraw_State);
249 } else { 251 } else {
250 this->nextState(kPreWarmTimingPerCanvasPreDraw_State); 252 this->nextState(kPreWarmTimingPerCanvasPreDraw_State);
251 } 253 }
252 this->resetTimingState(); 254 this->resetTimingState();
253 } else { 255 } else {
254 fCurrentFrame++; 256 fCurrentFrame++;
255 } 257 }
256 } 258 }
259
260 bool VisualLightweightBenchModule::onHandleChar(SkUnichar c) {
261 return true;
262 }
OLDNEW
« no previous file with comments | « tools/VisualBench/VisualLightweightBenchModule.h ('k') | tools/VisualBench/VisualModule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698