OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <math.h> | 5 #include <math.h> |
6 #include <stdio.h> // FIXME(brettw) erase me. | 6 #include <stdio.h> // FIXME(brettw) erase me. |
7 #ifndef _WIN32 | 7 #ifndef _WIN32 |
8 #include <sys/time.h> | 8 #include <sys/time.h> |
9 #else | 9 #else |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "ppapi/cpp/graphics_2d.h" | 24 #include "ppapi/cpp/graphics_2d.h" |
25 #include "ppapi/cpp/image_data.h" | 25 #include "ppapi/cpp/image_data.h" |
26 #include "ppapi/cpp/input_event.h" | 26 #include "ppapi/cpp/input_event.h" |
27 #include "ppapi/cpp/private/instance_private.h" | 27 #include "ppapi/cpp/private/instance_private.h" |
28 #include "ppapi/cpp/module.h" | 28 #include "ppapi/cpp/module.h" |
29 #include "ppapi/cpp/private/var_private.h" | 29 #include "ppapi/cpp/private/var_private.h" |
30 #include "ppapi/cpp/rect.h" | 30 #include "ppapi/cpp/rect.h" |
31 #include "ppapi/cpp/url_loader.h" | 31 #include "ppapi/cpp/url_loader.h" |
32 #include "ppapi/cpp/url_request_info.h" | 32 #include "ppapi/cpp/url_request_info.h" |
33 #include "ppapi/cpp/var.h" | 33 #include "ppapi/cpp/var.h" |
| 34 #include "ppapi/utility/completion_callback_factory.h" |
34 | 35 |
35 static const int kStepsPerCircle = 800; | 36 static const int kStepsPerCircle = 800; |
36 | 37 |
37 void FlushCallback(void* data, int32_t result); | 38 void FlushCallback(void* data, int32_t result); |
38 | 39 |
39 void FillRect(pp::ImageData* image, int left, int top, int width, int height, | 40 void FillRect(pp::ImageData* image, int left, int top, int width, int height, |
40 uint32_t color) { | 41 uint32_t color) { |
41 for (int y = std::max(0, top); | 42 for (int y = std::max(0, top); |
42 y < std::min(image->size().height() - 1, top + height); | 43 y < std::min(image->size().height() - 1, top + height); |
43 y++) { | 44 y++) { |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 }; | 500 }; |
500 | 501 |
501 namespace pp { | 502 namespace pp { |
502 | 503 |
503 // Factory function for your specialization of the Module object. | 504 // Factory function for your specialization of the Module object. |
504 Module* CreateModule() { | 505 Module* CreateModule() { |
505 return new MyModule(); | 506 return new MyModule(); |
506 } | 507 } |
507 | 508 |
508 } // namespace pp | 509 } // namespace pp |
OLD | NEW |