| 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 WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 class PPB_Graphics2D_Impl | 30 class PPB_Graphics2D_Impl |
| 31 : public Resource, | 31 : public Resource, |
| 32 public ::ppapi::thunk::PPB_Graphics2D_API { | 32 public ::ppapi::thunk::PPB_Graphics2D_API { |
| 33 public: | 33 public: |
| 34 virtual ~PPB_Graphics2D_Impl(); | 34 virtual ~PPB_Graphics2D_Impl(); |
| 35 | 35 |
| 36 static PP_Resource Create(PluginInstance* instance, | 36 static PP_Resource Create(PluginInstance* instance, |
| 37 const PP_Size& size, | 37 const PP_Size& size, |
| 38 PP_Bool is_always_opaque); | 38 PP_Bool is_always_opaque); |
| 39 | 39 |
| 40 // Returns a pointer to the interface implementing PPB_ImageData that is | |
| 41 // exposed to the plugin. | |
| 42 static const PPB_Graphics2D* GetInterface(); | |
| 43 | |
| 44 bool is_always_opaque() const { return is_always_opaque_; } | 40 bool is_always_opaque() const { return is_always_opaque_; } |
| 45 | 41 |
| 46 virtual ::ppapi::thunk::PPB_Graphics2D_API* AsPPB_Graphics2D_API(); | 42 virtual ::ppapi::thunk::PPB_Graphics2D_API* AsPPB_Graphics2D_API(); |
| 47 | 43 |
| 48 // Resource override. | 44 // Resource override. |
| 49 virtual PPB_Graphics2D_Impl* AsPPB_Graphics2D_Impl(); | 45 virtual PPB_Graphics2D_Impl* AsPPB_Graphics2D_Impl(); |
| 50 | 46 |
| 51 // PPB_Graphics2D functions. | 47 // PPB_Graphics2D functions. |
| 52 virtual PP_Bool Describe(PP_Size* size, PP_Bool* is_always_opaque); | 48 virtual PP_Bool Describe(PP_Size* size, PP_Bool* is_always_opaque); |
| 53 virtual void PaintImageData(PP_Resource image_data, | 49 virtual void PaintImageData(PP_Resource image_data, |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // This allows us to do more optimized painting in some cases. | 175 // This allows us to do more optimized painting in some cases. |
| 180 bool is_always_opaque_; | 176 bool is_always_opaque_; |
| 181 | 177 |
| 182 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics2D_Impl); | 178 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics2D_Impl); |
| 183 }; | 179 }; |
| 184 | 180 |
| 185 } // namespace ppapi | 181 } // namespace ppapi |
| 186 } // namespace webkit | 182 } // namespace webkit |
| 187 | 183 |
| 188 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ | 184 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ |
| OLD | NEW |