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 | 8 |
9 #include "VisualBench.h" | 9 #include "VisualBench.h" |
10 | 10 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 this->nextState(nextState); | 226 this->nextState(nextState); |
227 fCurrentFrame = 0; | 227 fCurrentFrame = 0; |
228 fTimer.start(); | 228 fTimer.start(); |
229 } else { | 229 } else { |
230 fCurrentFrame++; | 230 fCurrentFrame++; |
231 } | 231 } |
232 } | 232 } |
233 | 233 |
234 void VisualBench::draw(SkCanvas* canvas) { | 234 void VisualBench::draw(SkCanvas* canvas) { |
235 if (!this->advanceRecordIfNecessary(canvas)) { | 235 if (!this->advanceRecordIfNecessary(canvas)) { |
| 236 SkDebugf("Exiting VisualBench successfully\n"); |
236 this->closeWindow(); | 237 this->closeWindow(); |
237 return; | 238 return; |
238 } | 239 } |
239 this->renderFrame(canvas); | 240 this->renderFrame(canvas); |
240 switch (fState) { | 241 switch (fState) { |
241 case kPreWarmLoopsPerCanvasPreDraw_State: { | 242 case kPreWarmLoopsPerCanvasPreDraw_State: { |
242 this->perCanvasPreDraw(canvas, kPreWarmLoops_State); | 243 this->perCanvasPreDraw(canvas, kPreWarmLoops_State); |
243 break; | 244 break; |
244 } | 245 } |
245 case kPreWarmLoops_State: { | 246 case kPreWarmLoops_State: { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 349 |
349 void application_term() { | 350 void application_term() { |
350 SkEvent::Term(); | 351 SkEvent::Term(); |
351 SkGraphics::Term(); | 352 SkGraphics::Term(); |
352 } | 353 } |
353 | 354 |
354 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { | 355 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { |
355 return new VisualBench(hwnd, argc, argv); | 356 return new VisualBench(hwnd, argc, argv); |
356 } | 357 } |
357 | 358 |
OLD | NEW |