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

Side by Side Diff: tests/native_worker/mandel_worker.c

Issue 5622003: Restructure the structs/unions involved in SRPC argument passing. This will... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « tests/inbrowser_test_runner/test_runner.c ('k') | tests/native_worker/native_worker.c » ('j') | 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 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
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
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 }
OLDNEW
« no previous file with comments | « tests/inbrowser_test_runner/test_runner.c ('k') | tests/native_worker/native_worker.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698