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 Jan 27 17:10:16 2016. | 5 // From ppb_graphics_2d.idl modified Mon Apr 11 14:10:05 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 PP_Bool SetLayerTransform(PP_Resource resource, | |
106 float Scale, | |
wjmaclean
2016/04/13 14:47:19
Don't capitalize variable names.
alessandroa
2016/04/21 15:39:21
Done.
| |
107 const struct PP_Point* Origin, | |
108 const struct PP_Point* Transform) { | |
109 VLOG(4) << "PPB_Graphics2D::SetLayerTransform()"; | |
110 EnterResource<PPB_Graphics2D_API> enter(resource, true); | |
111 if (enter.failed()) | |
112 return PP_FALSE; | |
113 return enter.object()->SetLayerTransform(Scale, Origin, Transform); | |
114 } | |
115 | |
105 const PPB_Graphics2D_1_0 g_ppb_graphics2d_thunk_1_0 = { | 116 const PPB_Graphics2D_1_0 g_ppb_graphics2d_thunk_1_0 = { |
106 &Create, &IsGraphics2D, &Describe, &PaintImageData, | 117 &Create, &IsGraphics2D, &Describe, &PaintImageData, |
107 &Scroll, &ReplaceContents, &Flush}; | 118 &Scroll, &ReplaceContents, &Flush}; |
108 | 119 |
109 const PPB_Graphics2D_1_1 g_ppb_graphics2d_thunk_1_1 = { | 120 const PPB_Graphics2D_1_1 g_ppb_graphics2d_thunk_1_1 = { |
110 &Create, &IsGraphics2D, &Describe, &PaintImageData, &Scroll, | 121 &Create, &IsGraphics2D, &Describe, &PaintImageData, |
111 &ReplaceContents, &Flush, &SetScale, &GetScale}; | 122 &Scroll, &ReplaceContents, &Flush, &SetScale, |
123 &GetScale, &SetLayerTransform}; | |
112 | 124 |
113 } // namespace | 125 } // namespace |
114 | 126 |
115 PPAPI_THUNK_EXPORT const PPB_Graphics2D_1_0* GetPPB_Graphics2D_1_0_Thunk() { | 127 PPAPI_THUNK_EXPORT const PPB_Graphics2D_1_0* GetPPB_Graphics2D_1_0_Thunk() { |
116 return &g_ppb_graphics2d_thunk_1_0; | 128 return &g_ppb_graphics2d_thunk_1_0; |
117 } | 129 } |
118 | 130 |
119 PPAPI_THUNK_EXPORT const PPB_Graphics2D_1_1* GetPPB_Graphics2D_1_1_Thunk() { | 131 PPAPI_THUNK_EXPORT const PPB_Graphics2D_1_1* GetPPB_Graphics2D_1_1_Thunk() { |
120 return &g_ppb_graphics2d_thunk_1_1; | 132 return &g_ppb_graphics2d_thunk_1_1; |
121 } | 133 } |
122 | 134 |
123 } // namespace thunk | 135 } // namespace thunk |
124 } // namespace ppapi | 136 } // namespace ppapi |
OLD | NEW |