| 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 | 6 |
| 7 #include "ppapi/cpp/completion_callback.h" | |
| 8 #include "ppapi/cpp/graphics_2d.h" | 7 #include "ppapi/cpp/graphics_2d.h" |
| 9 #include "ppapi/cpp/image_data.h" | 8 #include "ppapi/cpp/image_data.h" |
| 10 #include "ppapi/cpp/instance.h" | 9 #include "ppapi/cpp/instance.h" |
| 11 #include "ppapi/cpp/module.h" | 10 #include "ppapi/cpp/module.h" |
| 12 #include "ppapi/cpp/paint_manager.h" | |
| 13 #include "ppapi/cpp/rect.h" | 11 #include "ppapi/cpp/rect.h" |
| 14 #include "ppapi/cpp/var.h" | 12 #include "ppapi/cpp/var.h" |
| 13 #include "ppapi/utility/completion_callback_factory.h" |
| 14 #include "ppapi/utility/graphics/paint_manager.h" |
| 15 | 15 |
| 16 static const int kSquareSpacing = 98; | 16 static const int kSquareSpacing = 98; |
| 17 static const int kSquareSize = 5; | 17 static const int kSquareSize = 5; |
| 18 | 18 |
| 19 static const int kAdvanceXPerFrame = 0; | 19 static const int kAdvanceXPerFrame = 0; |
| 20 static const int kAdvanceYPerFrame = -3; | 20 static const int kAdvanceYPerFrame = -3; |
| 21 | 21 |
| 22 void FillRect(pp::ImageData* image, const pp::Rect& rect, uint32_t color) { | 22 void FillRect(pp::ImageData* image, const pp::Rect& rect, uint32_t color) { |
| 23 for (int y = std::max(0, rect.y()); | 23 for (int y = std::max(0, rect.y()); |
| 24 y < std::min(image->size().height(), rect.bottom()); | 24 y < std::min(image->size().height(), rect.bottom()); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 namespace pp { | 113 namespace pp { |
| 114 | 114 |
| 115 // Factory function for your specialization of the Module object. | 115 // Factory function for your specialization of the Module object. |
| 116 Module* CreateModule() { | 116 Module* CreateModule() { |
| 117 return new MyModule(); | 117 return new MyModule(); |
| 118 } | 118 } |
| 119 | 119 |
| 120 } // namespace pp | 120 } // namespace pp |
| OLD | NEW |