| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cpp/dev/surface_3d_dev.h" | 5 #include "ppapi/cpp/dev/surface_3d_dev.h" |
| 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/cpp/instance.h" | 9 #include "ppapi/cpp/instance.h" |
| 10 #include "ppapi/cpp/module_impl.h" | 10 #include "ppapi/cpp/module_impl.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 PP_Config3D_Dev config, | 31 PP_Config3D_Dev config, |
| 32 const int32_t* attrib_list) { | 32 const int32_t* attrib_list) { |
| 33 if (has_interface<PPB_Surface3D_Dev>()) { | 33 if (has_interface<PPB_Surface3D_Dev>()) { |
| 34 PassRefFromConstructor(get_interface<PPB_Surface3D_Dev>()->Create( | 34 PassRefFromConstructor(get_interface<PPB_Surface3D_Dev>()->Create( |
| 35 instance.pp_instance(), | 35 instance.pp_instance(), |
| 36 config, | 36 config, |
| 37 attrib_list)); | 37 attrib_list)); |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 | 40 |
| 41 int32_t Surface3D_Dev::SwapBuffers() const { | 41 int32_t Surface3D_Dev::SwapBuffers(const CompletionCallback& cc) const { |
| 42 if (!has_interface<PPB_Surface3D_Dev>()) | 42 if (!has_interface<PPB_Surface3D_Dev>()) |
| 43 return PP_ERROR_NOINTERFACE; | 43 return PP_ERROR_NOINTERFACE; |
| 44 | 44 |
| 45 return get_interface<PPB_Surface3D_Dev>()->SwapBuffers( | 45 return get_interface<PPB_Surface3D_Dev>()->SwapBuffers( |
| 46 pp_resource(), | 46 pp_resource(), |
| 47 PP_BlockUntilComplete()); | 47 cc.pp_completion_callback()); |
| 48 } | 48 } |
| 49 | 49 |
| 50 } // namespace pp | 50 } // namespace pp |
| OLD | NEW |