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

Side by Side Diff: native_client_sdk/src/examples/demo/voronoi/voronoi.cc

Issue 19717004: [NaCl SDK] Add nacl_io and sdk_util namespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad copyright in mount_mem Created 7 years, 5 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include <assert.h> 5 #include <assert.h>
6 #include <math.h> 6 #include <math.h>
7 #include <ppapi/cpp/completion_callback.h> 7 #include <ppapi/cpp/completion_callback.h>
8 #include <ppapi/cpp/graphics_2d.h> 8 #include <ppapi/cpp/graphics_2d.h>
9 #include <ppapi/cpp/image_data.h> 9 #include <ppapi/cpp/image_data.h>
10 #include <ppapi/cpp/input_event.h> 10 #include <ppapi/cpp/input_event.h>
11 #include <ppapi/cpp/instance.h> 11 #include <ppapi/cpp/instance.h>
12 #include <ppapi/cpp/module.h> 12 #include <ppapi/cpp/module.h>
13 #include <ppapi/cpp/rect.h> 13 #include <ppapi/cpp/rect.h>
14 #include <ppapi/cpp/size.h> 14 #include <ppapi/cpp/size.h>
15 #include <ppapi/cpp/var.h> 15 #include <ppapi/cpp/var.h>
16 #include <ppapi/cpp/var_dictionary.h> 16 #include <ppapi/cpp/var_dictionary.h>
17 #include <pthread.h> 17 #include <pthread.h>
18 #include <stdio.h> 18 #include <stdio.h>
19 #include <stdlib.h> 19 #include <stdlib.h>
20 #include <string.h> 20 #include <string.h>
21 #include <sys/time.h> 21 #include <sys/time.h>
22 #include <unistd.h> 22 #include <unistd.h>
23 23
24 #include <algorithm> 24 #include <algorithm>
25 #include <string> 25 #include <string>
26 26
27 #include "sdk_util/thread_pool.h" 27 #include "sdk_util/thread_pool.h"
28 28
29 using namespace sdk_util; // For sdk_util::ThreadPool
30
29 // Global properties used to setup Voronoi demo. 31 // Global properties used to setup Voronoi demo.
30 namespace { 32 namespace {
31 const int kMinRectSize = 4; 33 const int kMinRectSize = 4;
32 const int kStartRecurseSize = 32; // must be power-of-two 34 const int kStartRecurseSize = 32; // must be power-of-two
33 const float kHugeZ = 1.0e38f; 35 const float kHugeZ = 1.0e38f;
34 const float kPI = M_PI; 36 const float kPI = M_PI;
35 const float kTwoPI = kPI * 2.0f; 37 const float kTwoPI = kPI * 2.0f;
36 const int kFramesToBenchmark = 100; 38 const int kFramesToBenchmark = 100;
37 const unsigned int kRandomStartSeed = 0xC0DE533D; 39 const unsigned int kRandomStartSeed = 0xC0DE533D;
38 const int kMaxPointCount = 1024; 40 const int kMaxPointCount = 1024;
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 return new Voronoi(instance); 583 return new Voronoi(instance);
582 } 584 }
583 }; 585 };
584 586
585 namespace pp { 587 namespace pp {
586 Module* CreateModule() { 588 Module* CreateModule() {
587 return new VoronoiModule(); 589 return new VoronoiModule();
588 } 590 }
589 } // namespace pp 591 } // namespace pp
590 592
OLDNEW
« no previous file with comments | « native_client_sdk/src/examples/demo/earth/earth.cc ('k') | native_client_sdk/src/libraries/nacl_io/error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698