| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_THUNK_PPB_GRAPHICS_2D_API_H_ | 5 #ifndef PPAPI_THUNK_PPB_GRAPHICS_2D_API_H_ |
| 6 #define PPAPI_THUNK_PPB_GRAPHICS_2D_API_H_ | 6 #define PPAPI_THUNK_PPB_GRAPHICS_2D_API_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "ppapi/c/pp_bool.h" | 9 #include "ppapi/c/pp_bool.h" |
| 10 #include "ppapi/c/pp_completion_callback.h" | 10 #include "ppapi/c/pp_completion_callback.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 namespace thunk { | 21 namespace thunk { |
| 22 | 22 |
| 23 class PPAPI_THUNK_EXPORT PPB_Graphics2D_API { | 23 class PPAPI_THUNK_EXPORT PPB_Graphics2D_API { |
| 24 public: | 24 public: |
| 25 virtual ~PPB_Graphics2D_API() {} | 25 virtual ~PPB_Graphics2D_API() {} |
| 26 | 26 |
| 27 virtual PP_Bool Describe(PP_Size* size, PP_Bool* is_always_opaque) = 0; | 27 virtual PP_Bool Describe(PP_Size* size, PP_Bool* is_always_opaque) = 0; |
| 28 virtual void PaintImageData(PP_Resource image_data, | 28 virtual void PaintImageData(PP_Resource image_data, |
| 29 const PP_Point* top_left, | 29 const PP_Point* top_left, |
| 30 const PP_Rect* src_rect) = 0; | 30 const PP_Rect* src_rect) = 0; |
| 31 virtual void Scroll(const PP_Rect* clip_rect, | 31 virtual void Scroll(const PP_Rect* clip_rect, const PP_Point* amount) = 0; |
| 32 const PP_Point* amount) = 0; | |
| 33 virtual void ReplaceContents(PP_Resource image_data) = 0; | 32 virtual void ReplaceContents(PP_Resource image_data) = 0; |
| 34 virtual int32_t Flush(scoped_refptr<TrackedCallback> callback) = 0; | 33 virtual int32_t Flush(scoped_refptr<TrackedCallback> callback) = 0; |
| 35 virtual PP_Bool SetScale(float scale) = 0; | 34 virtual PP_Bool SetScale(float scale) = 0; |
| 36 virtual float GetScale() = 0; | 35 virtual float GetScale() = 0; |
| 37 | 36 |
| 38 // Test only | 37 // Test only |
| 39 virtual bool ReadImageData(PP_Resource image, const PP_Point* top_left) = 0; | 38 virtual bool ReadImageData(PP_Resource image, const PP_Point* top_left) = 0; |
| 40 }; | 39 }; |
| 41 | 40 |
| 42 } // namespace thunk | 41 } // namespace thunk |
| 43 } // namespace ppapi | 42 } // namespace ppapi |
| 44 | 43 |
| 45 #endif // PPAPI_THUNK_PPB_GRAPHICS_2D_API_H_ | 44 #endif // PPAPI_THUNK_PPB_GRAPHICS_2D_API_H_ |
| OLD | NEW |