| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_2D_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_2D_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_2D_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_2D_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 static const PPB_Graphics2D* GetInterface(); | 35 static const PPB_Graphics2D* GetInterface(); |
| 36 | 36 |
| 37 bool Init(int width, int height, bool is_always_opaque); | 37 bool Init(int width, int height, bool is_always_opaque); |
| 38 | 38 |
| 39 bool is_always_opaque() const { return is_always_opaque_; } | 39 bool is_always_opaque() const { return is_always_opaque_; } |
| 40 | 40 |
| 41 // Resource override. | 41 // Resource override. |
| 42 virtual Graphics2D* AsGraphics2D() { return this; } | 42 virtual Graphics2D* AsGraphics2D() { return this; } |
| 43 | 43 |
| 44 // PPB_Graphics2D functions. | 44 // PPB_Graphics2D functions. |
| 45 bool Describe(PP_Size* size, bool* is_always_opaque); | 45 PP_Bool Describe(PP_Size* size, PP_Bool* is_always_opaque); |
| 46 void PaintImageData(PP_Resource image_data, | 46 void PaintImageData(PP_Resource image_data, |
| 47 const PP_Point* top_left, | 47 const PP_Point* top_left, |
| 48 const PP_Rect* src_rect); | 48 const PP_Rect* src_rect); |
| 49 void Scroll(const PP_Rect* clip_rect, const PP_Point* amount); | 49 void Scroll(const PP_Rect* clip_rect, const PP_Point* amount); |
| 50 void ReplaceContents(PP_Resource image_data); | 50 void ReplaceContents(PP_Resource image_data); |
| 51 int32_t Flush(const PP_CompletionCallback& callback); | 51 int32_t Flush(const PP_CompletionCallback& callback); |
| 52 | 52 |
| 53 bool ReadImageData(PP_Resource image, const PP_Point* top_left); | 53 bool ReadImageData(PP_Resource image, const PP_Point* top_left); |
| 54 | 54 |
| 55 // Assciates this device with the given plugin instance. You can pass NULL to | 55 // Assciates this device with the given plugin instance. You can pass NULL to |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 // Set to true if the plugin declares that this device will always be opaque. | 171 // Set to true if the plugin declares that this device will always be opaque. |
| 172 // This allows us to do more optimized painting in some cases. | 172 // This allows us to do more optimized painting in some cases. |
| 173 bool is_always_opaque_; | 173 bool is_always_opaque_; |
| 174 | 174 |
| 175 DISALLOW_COPY_AND_ASSIGN(Graphics2D); | 175 DISALLOW_COPY_AND_ASSIGN(Graphics2D); |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 } // namespace pepper | 178 } // namespace pepper |
| 179 | 179 |
| 180 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_2D_H_ | 180 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_2D_H_ |
| OLD | NEW |