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

Side by Side Diff: tools/iOSShell.cpp

Issue 657373002: Make nanobench and dm be usable from Chromium build (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try with dm.cpp being DM.cpp Created 6 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 | « gyp/most.gyp ('k') | no next file » | 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 2014 Google Inc. 2 * Copyright 2014 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 "iOSShell.h" 8 #include "iOSShell.h"
9 9
10 #include "Resources.h" 10 #include "Resources.h"
11 #include "SkApplication.h" 11 #include "SkApplication.h"
12 #include "SkCanvas.h" 12 #include "SkCanvas.h"
13 #include "SkCommonFlags.h" 13 #include "SkCommonFlags.h"
14 #include "SkGraphics.h" 14 #include "SkGraphics.h"
15 #include "SkWindow.h" 15 #include "SkWindow.h"
16 #include "dm.h"
17 #include "nanobench.h"
16 #include "sk_tool_utils.h" 18 #include "sk_tool_utils.h"
17 19
18 ////////////////////////////////////////////////////////////////////////////// 20 //////////////////////////////////////////////////////////////////////////////
19 21
20 static SkView* curr_view(SkWindow* wind) { 22 static SkView* curr_view(SkWindow* wind) {
21 SkView::F2BIter iter(wind); 23 SkView::F2BIter iter(wind);
22 return iter.next(); 24 return iter.next();
23 } 25 }
24 26
25 ShellWindow::ShellWindow(void* hwnd, int argc, char** argv) 27 ShellWindow::ShellWindow(void* hwnd, int argc, char** argv)
(...skipping 23 matching lines...) Expand all
49 this->INHERITED::onSizeChange(); 51 this->INHERITED::onSizeChange();
50 52
51 SkView::F2BIter iter(this); 53 SkView::F2BIter iter(this);
52 SkView* view = iter.next(); 54 SkView* view = iter.next();
53 view->setSize(this->width(), this->height()); 55 view->setSize(this->width(), this->height());
54 } 56 }
55 57
56 DEFINE_bool(dm, false, "run dm"); 58 DEFINE_bool(dm, false, "run dm");
57 DEFINE_bool(nanobench, false, "run nanobench"); 59 DEFINE_bool(nanobench, false, "run nanobench");
58 60
59 int nanobench_main();
60 int dm_main();
61
62 IOS_launch_type set_cmd_line_args(int argc, char *argv[], const char* resourceDi r) { 61 IOS_launch_type set_cmd_line_args(int argc, char *argv[], const char* resourceDi r) {
63 SkCommandLineFlags::Parse(argc, argv); 62 SkCommandLineFlags::Parse(argc, argv);
64 SetResourcePath(resourceDir); 63 SetResourcePath(resourceDir);
65 if (FLAGS_nanobench) { 64 if (FLAGS_nanobench) {
66 return nanobench_main() ? kError_iOSLaunchType : kTool_iOSLaunchType; 65 return nanobench_main() ? kError_iOSLaunchType : kTool_iOSLaunchType;
67 } 66 }
68 if (FLAGS_dm) { 67 if (FLAGS_dm) {
69 return dm_main() ? kError_iOSLaunchType : kTool_iOSLaunchType; 68 return dm_main() ? kError_iOSLaunchType : kTool_iOSLaunchType;
70 } 69 }
71 return kError_iOSLaunchType; 70 return kError_iOSLaunchType;
(...skipping 20 matching lines...) Expand all
92 SkGraphics::Init(); 91 SkGraphics::Init();
93 SkEvent::Init(); 92 SkEvent::Init();
94 } 93 }
95 94
96 // FIXME: this should be in a header 95 // FIXME: this should be in a header
97 void application_term(); 96 void application_term();
98 void application_term() { 97 void application_term() {
99 SkEvent::Term(); 98 SkEvent::Term();
100 SkGraphics::Term(); 99 SkGraphics::Term();
101 } 100 }
OLDNEW
« no previous file with comments | « gyp/most.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698