Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1089)

Side by Side Diff: src/shared/ppapi_proxy/plugin_surface_3d.cc

Issue 7631010: NaCl Proxy for graphics3d. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/shared/ppapi_proxy/plugin_resource.h ('k') | src/shared/ppapi_proxy/ppapi_proxy.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/shared/ppapi_proxy/plugin_resource.h ('k') | src/shared/ppapi_proxy/ppapi_proxy.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698