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

Side by Side Diff: tools/iOSShell.cpp

Issue 724073002: Revert of Make nanobench and dm be usable from Chromium build (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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"
18 #include "sk_tool_utils.h" 16 #include "sk_tool_utils.h"
19 17
20 ////////////////////////////////////////////////////////////////////////////// 18 //////////////////////////////////////////////////////////////////////////////
21 19
22 static SkView* curr_view(SkWindow* wind) { 20 static SkView* curr_view(SkWindow* wind) {
23 SkView::F2BIter iter(wind); 21 SkView::F2BIter iter(wind);
24 return iter.next(); 22 return iter.next();
25 } 23 }
26 24
27 ShellWindow::ShellWindow(void* hwnd, int argc, char** argv) 25 ShellWindow::ShellWindow(void* hwnd, int argc, char** argv)
(...skipping 23 matching lines...) Expand all
51 this->INHERITED::onSizeChange(); 49 this->INHERITED::onSizeChange();
52 50
53 SkView::F2BIter iter(this); 51 SkView::F2BIter iter(this);
54 SkView* view = iter.next(); 52 SkView* view = iter.next();
55 view->setSize(this->width(), this->height()); 53 view->setSize(this->width(), this->height());
56 } 54 }
57 55
58 DEFINE_bool(dm, false, "run dm"); 56 DEFINE_bool(dm, false, "run dm");
59 DEFINE_bool(nanobench, false, "run nanobench"); 57 DEFINE_bool(nanobench, false, "run nanobench");
60 58
59 int nanobench_main();
60 int dm_main();
61
61 IOS_launch_type set_cmd_line_args(int argc, char *argv[], const char* resourceDi r) { 62 IOS_launch_type set_cmd_line_args(int argc, char *argv[], const char* resourceDi r) {
62 SkCommandLineFlags::Parse(argc, argv); 63 SkCommandLineFlags::Parse(argc, argv);
63 SetResourcePath(resourceDir); 64 SetResourcePath(resourceDir);
64 if (FLAGS_nanobench) { 65 if (FLAGS_nanobench) {
65 return nanobench_main() ? kError_iOSLaunchType : kTool_iOSLaunchType; 66 return nanobench_main() ? kError_iOSLaunchType : kTool_iOSLaunchType;
66 } 67 }
67 if (FLAGS_dm) { 68 if (FLAGS_dm) {
68 return dm_main() ? kError_iOSLaunchType : kTool_iOSLaunchType; 69 return dm_main() ? kError_iOSLaunchType : kTool_iOSLaunchType;
69 } 70 }
70 return kError_iOSLaunchType; 71 return kError_iOSLaunchType;
(...skipping 20 matching lines...) Expand all
91 SkGraphics::Init(); 92 SkGraphics::Init();
92 SkEvent::Init(); 93 SkEvent::Init();
93 } 94 }
94 95
95 // FIXME: this should be in a header 96 // FIXME: this should be in a header
96 void application_term(); 97 void application_term();
97 void application_term() { 98 void application_term() {
98 SkEvent::Term(); 99 SkEvent::Term();
99 SkGraphics::Term(); 100 SkGraphics::Term();
100 } 101 }
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