| 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 17 matching lines...) Expand all Loading... |
| 28 // Between flushes we call flush on GrContext | 28 // Between flushes we call flush on GrContext |
| 29 | 29 |
| 30 DEFINE_int32(gpuFrameLag, 5, "Overestimate of maximum number of frames GPU allow
s to lag."); | 30 DEFINE_int32(gpuFrameLag, 5, "Overestimate of maximum number of frames GPU allow
s to lag."); |
| 31 DEFINE_int32(samples, 10, "Number of times to time each skp."); | 31 DEFINE_int32(samples, 10, "Number of times to time each skp."); |
| 32 DEFINE_int32(frames, 5, "Number of frames of each skp to render per sample."); | 32 DEFINE_int32(frames, 5, "Number of frames of each skp to render per sample."); |
| 33 DEFINE_double(flushMs, 20, "Target flush time in millseconds."); | 33 DEFINE_double(flushMs, 20, "Target flush time in millseconds."); |
| 34 DEFINE_double(loopMs, 5, "Target loop time in millseconds."); | 34 DEFINE_double(loopMs, 5, "Target loop time in millseconds."); |
| 35 DEFINE_int32(msaa, 0, "Number of msaa samples."); | 35 DEFINE_int32(msaa, 0, "Number of msaa samples."); |
| 36 DEFINE_bool2(fullscreen, f, true, "Run fullscreen."); | 36 DEFINE_bool2(fullscreen, f, true, "Run fullscreen."); |
| 37 DEFINE_bool2(verbose, v, false, "enable verbose output from the test driver."); | 37 DEFINE_bool2(verbose, v, false, "enable verbose output from the test driver."); |
| 38 DEFINE_string(key, "", ""); // dummy to enable gm tests that have platform-spec
ific names |
| 38 | 39 |
| 39 static SkString humanize(double ms) { | 40 static SkString humanize(double ms) { |
| 40 if (FLAGS_verbose) { | 41 if (FLAGS_verbose) { |
| 41 return SkStringPrintf("%llu", (uint64_t)(ms*1e6)); | 42 return SkStringPrintf("%llu", (uint64_t)(ms*1e6)); |
| 42 } | 43 } |
| 43 return HumanizeMs(ms); | 44 return HumanizeMs(ms); |
| 44 } | 45 } |
| 45 | 46 |
| 46 #define HUMANIZE(time) humanize(time).c_str() | 47 #define HUMANIZE(time) humanize(time).c_str() |
| 47 | 48 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 | 313 |
| 313 void application_term() { | 314 void application_term() { |
| 314 SkEvent::Term(); | 315 SkEvent::Term(); |
| 315 SkGraphics::Term(); | 316 SkGraphics::Term(); |
| 316 } | 317 } |
| 317 | 318 |
| 318 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { | 319 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { |
| 319 return new VisualBench(hwnd, argc, argv); | 320 return new VisualBench(hwnd, argc, argv); |
| 320 } | 321 } |
| 321 | 322 |
| OLD | NEW |