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 #include "ppapi/c/pp_completion_callback.h" | 5 #include "ppapi/c/pp_completion_callback.h" |
6 #include "ppapi/c/pp_errors.h" | 6 #include "ppapi/c/pp_errors.h" |
7 #include "ppapi/thunk/common.h" | 7 #include "ppapi/thunk/common.h" |
8 #include "ppapi/thunk/enter.h" | 8 #include "ppapi/thunk/enter.h" |
9 #include "ppapi/thunk/thunk.h" | 9 #include "ppapi/thunk/thunk.h" |
10 #include "ppapi/thunk/ppb_graphics_3d_api.h" | 10 #include "ppapi/thunk/ppb_graphics_3d_api.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 69 } |
70 | 70 |
71 int32_t SwapBuffers(PP_Resource graphics_3d, PP_CompletionCallback callback) { | 71 int32_t SwapBuffers(PP_Resource graphics_3d, PP_CompletionCallback callback) { |
72 EnterGraphics3D enter(graphics_3d, true); | 72 EnterGraphics3D enter(graphics_3d, true); |
73 if (enter.failed()) | 73 if (enter.failed()) |
74 return MayForceCallback(callback, PP_ERROR_BADRESOURCE); | 74 return MayForceCallback(callback, PP_ERROR_BADRESOURCE); |
75 int32_t result = enter.object()->SwapBuffers(callback); | 75 int32_t result = enter.object()->SwapBuffers(callback); |
76 return MayForceCallback(callback, result); | 76 return MayForceCallback(callback, result); |
77 } | 77 } |
78 | 78 |
79 const PPB_Graphics3D g_ppb_graphics_3d_thunk = { | 79 const PPB_Graphics3D_Dev g_ppb_graphics_3d_thunk = { |
80 &GetAttribMaxValue, | 80 &GetAttribMaxValue, |
81 &Create, | 81 &Create, |
82 &IsGraphics3D, | 82 &IsGraphics3D, |
83 &GetAttribs, | 83 &GetAttribs, |
84 &SetAttribs, | 84 &SetAttribs, |
85 &GetError, | 85 &GetError, |
86 &ResizeBuffers, | 86 &ResizeBuffers, |
87 &SwapBuffers | 87 &SwapBuffers |
88 }; | 88 }; |
89 | 89 |
90 } // namespace | 90 } // namespace |
91 | 91 |
92 const PPB_Graphics3D* GetPPB_Graphics3D_Thunk() { | 92 const PPB_Graphics3D_Dev* GetPPB_Graphics3D_Thunk() { |
93 return &g_ppb_graphics_3d_thunk; | 93 return &g_ppb_graphics_3d_thunk; |
94 } | 94 } |
95 | 95 |
96 } // namespace thunk | 96 } // namespace thunk |
97 } // namespace ppapi | 97 } // namespace ppapi |
OLD | NEW |