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_3d.idl modified Fri Nov 1 16:12:12 2013. | 5 // From ppb_graphics_3d.idl modified Fri Jun 13 10:40:42 2014. |
6 | 6 |
7 #include "ppapi/c/pp_completion_callback.h" | 7 #include "ppapi/c/pp_completion_callback.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/c/ppb_graphics_3d.h" | 9 #include "ppapi/c/ppb_graphics_3d.h" |
10 #include "ppapi/shared_impl/tracked_callback.h" | 10 #include "ppapi/shared_impl/tracked_callback.h" |
11 #include "ppapi/thunk/enter.h" | 11 #include "ppapi/thunk/enter.h" |
12 #include "ppapi/thunk/ppapi_thunk_export.h" | 12 #include "ppapi/thunk/ppapi_thunk_export.h" |
13 #include "ppapi/thunk/ppb_graphics_3d_api.h" | 13 #include "ppapi/thunk/ppb_graphics_3d_api.h" |
14 | 14 |
15 namespace ppapi { | 15 namespace ppapi { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 int32_t SwapBuffers(PP_Resource context, | 79 int32_t SwapBuffers(PP_Resource context, |
80 struct PP_CompletionCallback callback) { | 80 struct PP_CompletionCallback callback) { |
81 VLOG(4) << "PPB_Graphics3D::SwapBuffers()"; | 81 VLOG(4) << "PPB_Graphics3D::SwapBuffers()"; |
82 EnterResource<PPB_Graphics3D_API> enter(context, callback, true); | 82 EnterResource<PPB_Graphics3D_API> enter(context, callback, true); |
83 if (enter.failed()) | 83 if (enter.failed()) |
84 return enter.retval(); | 84 return enter.retval(); |
85 return enter.SetResult(enter.object()->SwapBuffers(enter.callback())); | 85 return enter.SetResult(enter.object()->SwapBuffers(enter.callback())); |
86 } | 86 } |
87 | 87 |
88 const PPB_Graphics3D_1_0 g_ppb_graphics3d_thunk_1_0 = {&GetAttribMaxValue, | 88 const PPB_Graphics3D_1_0 g_ppb_graphics3d_thunk_1_0 = { |
89 &Create, | 89 &GetAttribMaxValue, &Create, &IsGraphics3D, &GetAttribs, |
90 &IsGraphics3D, | 90 &SetAttribs, &GetError, &ResizeBuffers, &SwapBuffers}; |
91 &GetAttribs, | |
92 &SetAttribs, | |
93 &GetError, | |
94 &ResizeBuffers, | |
95 &SwapBuffers}; | |
96 | 91 |
97 } // namespace | 92 } // namespace |
98 | 93 |
99 PPAPI_THUNK_EXPORT const PPB_Graphics3D_1_0* GetPPB_Graphics3D_1_0_Thunk() { | 94 PPAPI_THUNK_EXPORT const PPB_Graphics3D_1_0* GetPPB_Graphics3D_1_0_Thunk() { |
100 return &g_ppb_graphics3d_thunk_1_0; | 95 return &g_ppb_graphics3d_thunk_1_0; |
101 } | 96 } |
102 | 97 |
103 } // namespace thunk | 98 } // namespace thunk |
104 } // namespace ppapi | 99 } // namespace ppapi |
OLD | NEW |