| 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 // From ppb_graphics_2d.idl modified Wed May 15 13:57:07 2013. | 5 // From ppb_graphics_2d.idl modified Wed Jan 27 17:10:16 2016. |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include "ppapi/c/pp_completion_callback.h" | 10 #include "ppapi/c/pp_completion_callback.h" |
| 11 #include "ppapi/c/pp_errors.h" | 11 #include "ppapi/c/pp_errors.h" |
| 12 #include "ppapi/c/ppb_graphics_2d.h" | 12 #include "ppapi/c/ppb_graphics_2d.h" |
| 13 #include "ppapi/shared_impl/tracked_callback.h" | 13 #include "ppapi/shared_impl/tracked_callback.h" |
| 14 #include "ppapi/thunk/enter.h" | 14 #include "ppapi/thunk/enter.h" |
| 15 #include "ppapi/thunk/ppapi_thunk_export.h" | 15 #include "ppapi/thunk/ppapi_thunk_export.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 } | 95 } |
| 96 | 96 |
| 97 float GetScale(PP_Resource resource) { | 97 float GetScale(PP_Resource resource) { |
| 98 VLOG(4) << "PPB_Graphics2D::GetScale()"; | 98 VLOG(4) << "PPB_Graphics2D::GetScale()"; |
| 99 EnterResource<PPB_Graphics2D_API> enter(resource, true); | 99 EnterResource<PPB_Graphics2D_API> enter(resource, true); |
| 100 if (enter.failed()) | 100 if (enter.failed()) |
| 101 return 0.0f; | 101 return 0.0f; |
| 102 return enter.object()->GetScale(); | 102 return enter.object()->GetScale(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 const PPB_Graphics2D_1_0 g_ppb_graphics2d_thunk_1_0 = {&Create, | 105 const PPB_Graphics2D_1_0 g_ppb_graphics2d_thunk_1_0 = { |
| 106 &IsGraphics2D, | 106 &Create, &IsGraphics2D, &Describe, &PaintImageData, |
| 107 &Describe, | 107 &Scroll, &ReplaceContents, &Flush}; |
| 108 &PaintImageData, | |
| 109 &Scroll, | |
| 110 &ReplaceContents, | |
| 111 &Flush}; | |
| 112 | 108 |
| 113 const PPB_Graphics2D_1_1 g_ppb_graphics2d_thunk_1_1 = {&Create, | 109 const PPB_Graphics2D_1_1 g_ppb_graphics2d_thunk_1_1 = { |
| 114 &IsGraphics2D, | 110 &Create, &IsGraphics2D, &Describe, &PaintImageData, &Scroll, |
| 115 &Describe, | 111 &ReplaceContents, &Flush, &SetScale, &GetScale}; |
| 116 &PaintImageData, | |
| 117 &Scroll, | |
| 118 &ReplaceContents, | |
| 119 &Flush, | |
| 120 &SetScale, | |
| 121 &GetScale}; | |
| 122 | 112 |
| 123 } // namespace | 113 } // namespace |
| 124 | 114 |
| 125 PPAPI_THUNK_EXPORT const PPB_Graphics2D_1_0* GetPPB_Graphics2D_1_0_Thunk() { | 115 PPAPI_THUNK_EXPORT const PPB_Graphics2D_1_0* GetPPB_Graphics2D_1_0_Thunk() { |
| 126 return &g_ppb_graphics2d_thunk_1_0; | 116 return &g_ppb_graphics2d_thunk_1_0; |
| 127 } | 117 } |
| 128 | 118 |
| 129 PPAPI_THUNK_EXPORT const PPB_Graphics2D_1_1* GetPPB_Graphics2D_1_1_Thunk() { | 119 PPAPI_THUNK_EXPORT const PPB_Graphics2D_1_1* GetPPB_Graphics2D_1_1_Thunk() { |
| 130 return &g_ppb_graphics2d_thunk_1_1; | 120 return &g_ppb_graphics2d_thunk_1_1; |
| 131 } | 121 } |
| 132 | 122 |
| 133 } // namespace thunk | 123 } // namespace thunk |
| 134 } // namespace ppapi | 124 } // namespace ppapi |
| OLD | NEW |