OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 "Request.h" | 8 #include "Request.h" |
9 #include "Response.h" | 9 #include "Response.h" |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 fHandlers.push_back(new ClipAlphaHandler); | 38 fHandlers.push_back(new ClipAlphaHandler); |
39 fHandlers.push_back(new EnableGPUHandler); | 39 fHandlers.push_back(new EnableGPUHandler); |
40 fHandlers.push_back(new CmdHandler); | 40 fHandlers.push_back(new CmdHandler); |
41 fHandlers.push_back(new InfoHandler); | 41 fHandlers.push_back(new InfoHandler); |
42 fHandlers.push_back(new DownloadHandler); | 42 fHandlers.push_back(new DownloadHandler); |
43 fHandlers.push_back(new DataHandler); | 43 fHandlers.push_back(new DataHandler); |
44 fHandlers.push_back(new BreakHandler); | 44 fHandlers.push_back(new BreakHandler); |
45 fHandlers.push_back(new BatchesHandler); | 45 fHandlers.push_back(new BatchesHandler); |
46 fHandlers.push_back(new BatchBoundsHandler); | 46 fHandlers.push_back(new BatchBoundsHandler); |
47 fHandlers.push_back(new ColorModeHandler); | 47 fHandlers.push_back(new ColorModeHandler); |
48 fHandlers.push_back(new SRGBModeHandler); | |
49 fHandlers.push_back(new QuitHandler); | 48 fHandlers.push_back(new QuitHandler); |
50 } | 49 } |
51 | 50 |
52 ~UrlManager() { | 51 ~UrlManager() { |
53 for (int i = 0; i < fHandlers.count(); i++) { delete fHandlers[i]; } | 52 for (int i = 0; i < fHandlers.count(); i++) { delete fHandlers[i]; } |
54 } | 53 } |
55 | 54 |
56 // This is clearly not efficient for a large number of urls and handlers | 55 // This is clearly not efficient for a large number of urls and handlers |
57 int invoke(Request* request, MHD_Connection* connection, const char* url, co
nst char* method, | 56 int invoke(Request* request, MHD_Connection* connection, const char* url, co
nst char* method, |
58 const char* upload_data, size_t* upload_data_size) const { | 57 const char* upload_data, size_t* upload_data_size) const { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 MHD_stop_daemon(daemon); | 130 MHD_stop_daemon(daemon); |
132 return 0; | 131 return 0; |
133 } | 132 } |
134 | 133 |
135 #if !defined SK_BUILD_FOR_IOS | 134 #if !defined SK_BUILD_FOR_IOS |
136 int main(int argc, char** argv) { | 135 int main(int argc, char** argv) { |
137 SkCommandLineFlags::Parse(argc, argv); | 136 SkCommandLineFlags::Parse(argc, argv); |
138 return skiaserve_main(); | 137 return skiaserve_main(); |
139 } | 138 } |
140 #endif | 139 #endif |
OLD | NEW |