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

Side by Side Diff: native_client_sdk/src/examples/hello_world_gles/hello_world.cc

Issue 13106002: [NaCl SDK] A bunch of spelling fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix presubmit Created 7 years, 9 months 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
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 /** @file hello_world_gles.cc 6 /** @file hello_world_gles.cc
7 * This example demonstrates loading and running a simple 3D openGL ES 2.0 7 * This example demonstrates loading and running a simple 3D openGL ES 2.0
8 * application. 8 * application.
9 */ 9 */
10 10
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 // If we can't preallocate the buffer because the size is unknown, then 389 // If we can't preallocate the buffer because the size is unknown, then
390 // fail the load. 390 // fail the load.
391 if (total == -1) { 391 if (total == -1) {
392 req->cb_(NULL); 392 req->cb_(NULL);
393 FreeRequest(req); 393 FreeRequest(req);
394 return; 394 return;
395 } 395 }
396 396
397 // Otherwise allocate a buffer with enough space for a terminating 397 // Otherwise allocate a buffer with enough space for a terminating
398 // NUL in case we need one. 398 // NULL in case we need one.
399 cnt = (total > LONG_MAX) ? LONG_MAX : (int32_t) total; 399 cnt = (total > LONG_MAX) ? LONG_MAX : (int32_t) total;
400 req->buf_ = (char *) malloc(cnt + 1); 400 req->buf_ = (char *) malloc(cnt + 1);
401 req->buf_[cnt] = 0; 401 req->buf_[cnt] = 0;
402 req->size_ = cnt; 402 req->size_ = cnt;
403 int32_t bytes = ppb_urlloader_interface->ReadResponseBody(req->loader_, 403 int32_t bytes = ppb_urlloader_interface->ReadResponseBody(req->loader_,
404 req->buf_, cnt, PP_MakeCompletionCallback(URLPartialRead, req)); 404 req->buf_, cnt, PP_MakeCompletionCallback(URLPartialRead, req));
405 405
406 // Usually we are pending. 406 // Usually we are pending.
407 if (bytes == PP_OK_COMPLETIONPENDING) return; 407 if (bytes == PP_OK_COMPLETIONPENDING) return;
408 408
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 } 604 }
605 return NULL; 605 return NULL;
606 } 606 }
607 607
608 608
609 /** 609 /**
610 * Called before the plugin module is unloaded. 610 * Called before the plugin module is unloaded.
611 */ 611 */
612 PP_EXPORT void PPP_ShutdownModule() { 612 PP_EXPORT void PPP_ShutdownModule() {
613 } 613 }
OLDNEW
« no previous file with comments | « native_client_sdk/src/examples/hello_nacl_io/queue.h ('k') | native_client_sdk/src/examples/hello_world_gles/matrix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698