| 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 14 matching lines...) Expand all Loading... |
| 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/cpp/view.h" | 34 #include "ppapi/cpp/view.h" |
| 35 #include "ppapi/utility/completion_callback_factory.h" |
| 35 | 36 |
| 36 static const int kStepsPerCircle = 800; | 37 static const int kStepsPerCircle = 800; |
| 37 | 38 |
| 38 void FlushCallback(void* data, int32_t result); | 39 void FlushCallback(void* data, int32_t result); |
| 39 | 40 |
| 40 void FillRect(pp::ImageData* image, int left, int top, int width, int height, | 41 void FillRect(pp::ImageData* image, int left, int top, int width, int height, |
| 41 uint32_t color) { | 42 uint32_t color) { |
| 42 for (int y = std::max(0, top); | 43 for (int y = std::max(0, top); |
| 43 y < std::min(image->size().height() - 1, top + height); | 44 y < std::min(image->size().height() - 1, top + height); |
| 44 y++) { | 45 y++) { |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 }; | 495 }; |
| 495 | 496 |
| 496 namespace pp { | 497 namespace pp { |
| 497 | 498 |
| 498 // Factory function for your specialization of the Module object. | 499 // Factory function for your specialization of the Module object. |
| 499 Module* CreateModule() { | 500 Module* CreateModule() { |
| 500 return new MyModule(); | 501 return new MyModule(); |
| 501 } | 502 } |
| 502 | 503 |
| 503 } // namespace pp | 504 } // namespace pp |
| OLD | NEW |