OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Native Client Authors. All rights reserved. | 2 * Copyright 2008 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 /* | 7 /* |
8 * Simple demo for nacl native web worker, tiled mandelbrot set | 8 * Simple demo for nacl native web worker, tiled mandelbrot set |
9 */ | 9 */ |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 103 } |
104 | 104 |
105 return sprintf(rgb, "rgb(%03u,%03u,%03u)", r, g, b); | 105 return sprintf(rgb, "rgb(%03u,%03u,%03u)", r, g, b); |
106 } | 106 } |
107 | 107 |
108 | 108 |
109 void MandelWorker(NaClSrpcRpc *rpc, | 109 void MandelWorker(NaClSrpcRpc *rpc, |
110 NaClSrpcArg **in_args, | 110 NaClSrpcArg **in_args, |
111 NaClSrpcArg **out_args, | 111 NaClSrpcArg **out_args, |
112 NaClSrpcClosure *done) { | 112 NaClSrpcClosure *done) { |
113 char* argstr = in_args[0]->u.sval.str; | 113 char* argstr = in_args[0]->arrays.str; |
114 int xlow; | 114 int xlow; |
115 int ylow; | 115 int ylow; |
116 int canvas_width; | 116 int canvas_width; |
117 int tile_width; | 117 int tile_width; |
118 int tiles_per_row; | 118 int tiles_per_row; |
119 char* p; | 119 char* p; |
120 int x; | 120 int x; |
121 int y; | 121 int y; |
122 size_t string_size; | 122 size_t string_size; |
123 char* string; | 123 char* string; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 int main() { | 170 int main() { |
171 if (!NaClSrpcModuleInit()) { | 171 if (!NaClSrpcModuleInit()) { |
172 return 1; | 172 return 1; |
173 } | 173 } |
174 if (!NaClSrpcAcceptClientConnection(srpc_methods)) { | 174 if (!NaClSrpcAcceptClientConnection(srpc_methods)) { |
175 return 1; | 175 return 1; |
176 } | 176 } |
177 NaClSrpcModuleFini(); | 177 NaClSrpcModuleFini(); |
178 return 0; | 178 return 0; |
179 } | 179 } |
OLD | NEW |