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