| 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/cpp/dev/graphics_3d_dev.h" | 5 #include "ppapi/cpp/dev/graphics_3d_dev.h" |
| 6 | 6 |
| 7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
| 8 #include "ppapi/cpp/completion_callback.h" | 8 #include "ppapi/cpp/completion_callback.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 19 matching lines...) Expand all Loading... |
| 30 PassRefFromConstructor(get_interface<PPB_Graphics3D_Dev>()->Create( | 30 PassRefFromConstructor(get_interface<PPB_Graphics3D_Dev>()->Create( |
| 31 instance.pp_instance(), | 31 instance.pp_instance(), |
| 32 share_context.pp_resource(), | 32 share_context.pp_resource(), |
| 33 attrib_list)); | 33 attrib_list)); |
| 34 } | 34 } |
| 35 } | 35 } |
| 36 | 36 |
| 37 Graphics3D_Dev::~Graphics3D_Dev() { | 37 Graphics3D_Dev::~Graphics3D_Dev() { |
| 38 } | 38 } |
| 39 | 39 |
| 40 // static | |
| 41 Var Graphics3D_Dev::GetString(int32_t name) { | |
| 42 if (!has_interface<PPB_Graphics3D_Dev>()) | |
| 43 return Var(); | |
| 44 | |
| 45 return Var(Var::PassRef(), | |
| 46 get_interface<PPB_Graphics3D_Dev>()->GetString(name)); | |
| 47 } | |
| 48 | |
| 49 int32_t Graphics3D_Dev::GetAttribs(int32_t* attrib_list) const { | 40 int32_t Graphics3D_Dev::GetAttribs(int32_t* attrib_list) const { |
| 50 if (!has_interface<PPB_Graphics3D_Dev>()) | 41 if (!has_interface<PPB_Graphics3D_Dev>()) |
| 51 return PP_ERROR_NOINTERFACE; | 42 return PP_ERROR_NOINTERFACE; |
| 52 | 43 |
| 53 return get_interface<PPB_Graphics3D_Dev>()->GetAttribs( | 44 return get_interface<PPB_Graphics3D_Dev>()->GetAttribs( |
| 54 pp_resource(), | 45 pp_resource(), |
| 55 attrib_list); | 46 attrib_list); |
| 56 } | 47 } |
| 57 | 48 |
| 58 int32_t Graphics3D_Dev::SetAttribs(int32_t* attrib_list) { | 49 int32_t Graphics3D_Dev::SetAttribs(int32_t* attrib_list) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 76 if (!has_interface<PPB_Graphics3D_Dev>()) | 67 if (!has_interface<PPB_Graphics3D_Dev>()) |
| 77 return PP_ERROR_NOINTERFACE; | 68 return PP_ERROR_NOINTERFACE; |
| 78 | 69 |
| 79 return get_interface<PPB_Graphics3D_Dev>()->SwapBuffers( | 70 return get_interface<PPB_Graphics3D_Dev>()->SwapBuffers( |
| 80 pp_resource(), | 71 pp_resource(), |
| 81 cc.pp_completion_callback()); | 72 cc.pp_completion_callback()); |
| 82 } | 73 } |
| 83 | 74 |
| 84 } // namespace pp | 75 } // namespace pp |
| 85 | 76 |
| OLD | NEW |