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

Unified Diff: src/shared/ppapi_proxy/browser_image_data.cc

Issue 5974006: Convert srpc definitions from using int64 to using PP_Instance, PP_Module, an... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 10 years 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 side-by-side diff with in-line comments
Download patch
Index: src/shared/ppapi_proxy/browser_image_data.cc
===================================================================
--- src/shared/ppapi_proxy/browser_image_data.cc (revision 4034)
+++ src/shared/ppapi_proxy/browser_image_data.cc (working copy)
@@ -44,37 +44,34 @@
void PpbImageDataRpcServer::PPB_ImageData_Create(
NaClSrpcRpc* rpc,
NaClSrpcClosure* done,
- int64_t module,
+ PP_Module module,
int32_t format,
nacl_abi_size_t size_bytes, int32_t* size,
int32_t init_to_zero,
- int64_t* resource) {
+ PP_Resource* resource) {
NaClSrpcClosureRunner runner(done);
rpc->result = NACL_SRPC_RESULT_APP_ERROR;
if (size_bytes != sizeof(struct PP_Size)) {
return;
}
- PP_Resource pp_resource =
- ppapi_proxy::PPBImageDataInterface()->Create(
- static_cast<PP_Module>(module),
- static_cast<PP_ImageDataFormat>(format),
- static_cast<const struct PP_Size*>(
- reinterpret_cast<struct PP_Size*>(size)),
- (init_to_zero ? PP_TRUE : PP_FALSE));
- *resource = static_cast<int64_t>(pp_resource);
+ *resource = ppapi_proxy::PPBImageDataInterface()->Create(
+ module,
+ static_cast<PP_ImageDataFormat>(format),
+ static_cast<const struct PP_Size*>(
+ reinterpret_cast<struct PP_Size*>(size)),
+ (init_to_zero ? PP_TRUE : PP_FALSE));
rpc->result = NACL_SRPC_RESULT_OK;
}
void PpbImageDataRpcServer::PPB_ImageData_IsImageData(
NaClSrpcRpc* rpc,
NaClSrpcClosure* done,
- int64_t resource,
+ PP_Resource resource,
int32_t* success) {
NaClSrpcClosureRunner runner(done);
rpc->result = NACL_SRPC_RESULT_APP_ERROR;
PP_Bool pp_success =
- ppapi_proxy::PPBImageDataInterface()->IsImageData(
- static_cast<PP_Resource>(resource));
+ ppapi_proxy::PPBImageDataInterface()->IsImageData(resource);
*success = (pp_success == PP_TRUE);
rpc->result = NACL_SRPC_RESULT_OK;
}
@@ -82,7 +79,7 @@
void PpbImageDataRpcServer::PPB_ImageData_Describe(
NaClSrpcRpc* rpc,
NaClSrpcClosure* done,
- int64_t resource,
+ PP_Resource resource,
nacl_abi_size_t* desc_bytes, int32_t* desc,
int32_t* success) {
NaClSrpcClosureRunner runner(done);
@@ -92,7 +89,7 @@
}
PP_Bool pp_success =
ppapi_proxy::PPBImageDataInterface()->Describe(
- static_cast<PP_Resource>(resource),
+ resource,
nfullagar 2010/12/23 21:37:00 line above and line below could fit on one line?
noelallen_use_chromium 2010/12/23 22:23:23 Done.
reinterpret_cast<struct PP_ImageDataDesc*>(desc));
*success = (pp_success == PP_TRUE);
rpc->result = NACL_SRPC_RESULT_OK;

Powered by Google App Engine
This is Rietveld 408576698