OLD | NEW |
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 <pthread.h> | 16 #include <pthread.h> |
17 #include <stdio.h> | 17 #include <stdio.h> |
18 #include <stdlib.h> | 18 #include <stdlib.h> |
19 #include <string.h> | 19 #include <string.h> |
20 #include <sys/time.h> | 20 #include <sys/time.h> |
21 #include <unistd.h> | 21 #include <unistd.h> |
22 | 22 |
23 #include <algorithm> | 23 #include <algorithm> |
24 #include <string> | 24 #include <string> |
25 | 25 |
26 #include "threadpool.h" | 26 #include "sdk_util/thread_pool.h" |
27 | 27 |
28 // Global properties used to setup Voronoi demo. | 28 // Global properties used to setup Voronoi demo. |
29 namespace { | 29 namespace { |
30 const int kMinRectSize = 4; | 30 const int kMinRectSize = 4; |
31 const int kStartRecurseSize = 32; // must be power-of-two | 31 const int kStartRecurseSize = 32; // must be power-of-two |
32 const float kHugeZ = 1.0e38f; | 32 const float kHugeZ = 1.0e38f; |
33 const float kPI = M_PI; | 33 const float kPI = M_PI; |
34 const float kTwoPI = kPI * 2.0f; | 34 const float kTwoPI = kPI * 2.0f; |
35 const int kFramesToBenchmark = 100; | 35 const int kFramesToBenchmark = 100; |
36 const unsigned int kRandomStartSeed = 0xC0DE533D; | 36 const unsigned int kRandomStartSeed = 0xC0DE533D; |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 return new Voronoi(instance); | 573 return new Voronoi(instance); |
574 } | 574 } |
575 }; | 575 }; |
576 | 576 |
577 namespace pp { | 577 namespace pp { |
578 Module* CreateModule() { | 578 Module* CreateModule() { |
579 return new VoronoiModule(); | 579 return new VoronoiModule(); |
580 } | 580 } |
581 } // namespace pp | 581 } // namespace pp |
582 | 582 |
OLD | NEW |