| OLD | NEW |
| 1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2011 The Native Client 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 "native_client/src/shared/ppapi_proxy/plugin_surface_3d.h" | 5 #include "native_client/src/shared/ppapi_proxy/plugin_surface_3d.h" |
| 6 | 6 |
| 7 #include "native_client/src/shared/ppapi_proxy/plugin_callback.h" | 7 #include "native_client/src/shared/ppapi_proxy/plugin_callback.h" |
| 8 #include "native_client/src/shared/ppapi_proxy/plugin_context_3d.h" | 8 #include "native_client/src/shared/ppapi_proxy/plugin_context_3d.h" |
| 9 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" | 9 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" |
| 10 #include "native_client/src/shared/ppapi_proxy/utility.h" | 10 #include "native_client/src/shared/ppapi_proxy/utility.h" |
| 11 #include "native_client/src/shared/srpc/nacl_srpc.h" | 11 #include "native_client/src/shared/srpc/nacl_srpc.h" |
| 12 #include "native_client/src/third_party/ppapi/c/pp_completion_callback.h" | 12 #include "native_client/src/third_party/ppapi/c/pp_completion_callback.h" |
| 13 #include "native_client/src/third_party/ppapi/c/pp_errors.h" | 13 #include "native_client/src/third_party/ppapi/c/pp_errors.h" |
| 14 #include "srpcgen/ppb_rpc.h" | 14 #include "srpcgen/ppb_rpc.h" |
| 15 | 15 |
| 16 namespace ppapi_proxy { | 16 namespace ppapi_proxy { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 PP_Resource Create(PP_Instance instance, | 20 PP_Resource Create(PP_Instance instance, |
| 21 PP_Config3D_Dev config, | 21 PP_Config3D_Dev config, |
| 22 const int32_t* attrib_list) { | 22 const int32_t* attrib_list) { |
| 23 DebugPrintf("PPB_Surface3D::Create: instance=%"NACL_PRIu32"\n", instance); | 23 DebugPrintf("PPB_Surface3D::Create: instance=%"NACL_PRIu32"\n", instance); |
| 24 nacl_abi_size_t attrib_list_size = 0; | 24 nacl_abi_size_t attrib_list_size = 0; |
| 25 PP_Resource resource; | 25 PP_Resource resource; |
| 26 if (attrib_list) { | 26 if (attrib_list) { |
| 27 attrib_list_size = 1; | 27 attrib_list_size = 1; |
| 28 while (PP_GRAPHICS3DATTRIBVALUE_NONE != attrib_list[attrib_list_size - 1]) { | 28 while (PP_GRAPHICS3DATTRIB_NONE != attrib_list[attrib_list_size - 1]) { |
| 29 attrib_list_size += 2; | 29 attrib_list_size += 2; |
| 30 } | 30 } |
| 31 } | 31 } |
| 32 NaClSrpcError retval = | 32 NaClSrpcError retval = |
| 33 PpbGraphics3DRpcClient::PPB_Surface3D_Create( | 33 PpbGraphics3DRpcClient::PPB_Surface3D_Create( |
| 34 GetMainSrpcChannel(), | 34 GetMainSrpcChannel(), |
| 35 instance, | 35 instance, |
| 36 config, | 36 config, |
| 37 attrib_list_size, | 37 attrib_list_size, |
| 38 const_cast<int32_t*>(attrib_list), | 38 const_cast<int32_t*>(attrib_list), |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 &Create, | 133 &Create, |
| 134 &IsSurface3D, | 134 &IsSurface3D, |
| 135 &SetAttrib, | 135 &SetAttrib, |
| 136 &GetAttrib, | 136 &GetAttrib, |
| 137 &SwapBuffs | 137 &SwapBuffs |
| 138 }; | 138 }; |
| 139 return &intf; | 139 return &intf; |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace ppapi_proxy | 142 } // namespace ppapi_proxy |
| OLD | NEW |