| 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 #ifndef PPAPI_CPP_GRAPHICS_2D_H_ | 5 #ifndef PPAPI_CPP_GRAPHICS_2D_H_ |
| 6 #define PPAPI_CPP_GRAPHICS_2D_H_ | 6 #define PPAPI_CPP_GRAPHICS_2D_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_stdint.h" | 8 #include "ppapi/c/pp_stdint.h" |
| 9 #include "ppapi/cpp/resource.h" | 9 #include "ppapi/cpp/resource.h" |
| 10 #include "ppapi/cpp/size.h" | 10 #include "ppapi/cpp/size.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 /// It is possible that the destructor does not toally destroy the underlying | 56 /// It is possible that the destructor does not toally destroy the underlying |
| 57 /// 2D context if there are outstanding references to it. | 57 /// 2D context if there are outstanding references to it. |
| 58 virtual ~Graphics2D(); | 58 virtual ~Graphics2D(); |
| 59 | 59 |
| 60 /// This function assigns one 2D graphics context to this 2D graphics | 60 /// This function assigns one 2D graphics context to this 2D graphics |
| 61 /// context. This function increases the reference count of the 2D resource | 61 /// context. This function increases the reference count of the 2D resource |
| 62 /// of the other 2D graphics context while decrementing the reference counter | 62 /// of the other 2D graphics context while decrementing the reference counter |
| 63 /// of this 2D graphics context. | 63 /// of this 2D graphics context. |
| 64 /// | 64 /// |
| 65 /// @param[in] other An other 2D graphics context. | 65 /// @param[in] other An other 2D graphics context. |
| 66 /// |
| 66 /// @return A new Graphics2D context. | 67 /// @return A new Graphics2D context. |
| 67 Graphics2D& operator=(const Graphics2D& other); | 68 Graphics2D& operator=(const Graphics2D& other); |
| 68 | 69 |
| 69 /// Getter function for returning size of the 2D graphics context. | 70 /// Getter function for returning size of the 2D graphics context. |
| 70 /// | 71 /// |
| 71 /// @return The size of the 2D graphics context measured in device pixels. | 72 /// @return The size of the 2D graphics context measured in device pixels. |
| 72 const Size& size() const { return size_; } | 73 const Size& size() const { return size_; } |
| 73 | 74 |
| 74 /// PaintImageData() enqueues a paint command of the given image into | 75 /// PaintImageData() enqueues a paint command of the given image into |
| 75 /// the context. This command has no effect until you call Flush(). As a | 76 /// the context. This command has no effect until you call Flush(). As a |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // for it. | 255 // for it. |
| 255 int32_t Flush(const CompletionCallback& cc); | 256 int32_t Flush(const CompletionCallback& cc); |
| 256 | 257 |
| 257 private: | 258 private: |
| 258 Size size_; | 259 Size size_; |
| 259 }; | 260 }; |
| 260 | 261 |
| 261 } // namespace pp | 262 } // namespace pp |
| 262 | 263 |
| 263 #endif // PPAPI_CPP_GRAPHICS_2D_H_ | 264 #endif // PPAPI_CPP_GRAPHICS_2D_H_ |
| OLD | NEW |