diff options
author | Yuqian Li <liyuqian@google.com> | 2017-09-27 13:25:36 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-29 14:21:04 +0000 |
commit | 6e3d9950e34aac581150697e1a5a561c5acd5b88 (patch) | |
tree | 20c837a6957db28653455f7d88486fe8ce4da15f /samplecode | |
parent | b268d23281c0c487da2fb79a5106b6372e25ae70 (diff) |
Add width and height option to SampleApp
So we can benchmark with given width/height dimensions.
Bug: skia:
Change-Id: I881c9f054cdcecc3e0b2bfb600afd778e1c57d95
Reviewed-on: https://skia-review.googlesource.com/51246
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleApp.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index 515bcd6a6b..7beffda9e9 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -762,15 +762,15 @@ DEFINE_int32(backendTiles, 0, "Number of tiles in the experimental threaded back DEFINE_int32(backendThreads, 0, "Number of threads in the experimental threaded backend."); DEFINE_int32(measureMS, 0, "Number of miliseconds to measure the FPS before closing the SampleApp. " "If it's 0, we won't measure the FPS or close SampleApp automatically."); +DEFINE_int32(width, 1024, "Width of the window"); +DEFINE_int32(height, 768, "Height of the window"); #include "SkTaskGroup.h" SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* devManager) - : INHERITED(hwnd) + : INHERITED(hwnd, FLAGS_width, FLAGS_height) , fDevManager(nullptr) { - SkCommandLineFlags::Parse(argc, argv); - fCurrIndex = -1; if (!FLAGS_pictureDir.isEmpty()) { @@ -2528,6 +2528,8 @@ static void test() { // FIXME: this should be in a header SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv); SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { + SkCommandLineFlags::Parse(argc, argv); + if (false) { // avoid bit rot, suppress warning test(); } |