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

Unified Diff: ppapi/proxy/ppb_image_data_proxy.cc

Issue 1145893009: Change transport dib API to not make copies of SharedMemoryHandle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shared_memory_pepper_rename
Patch Set: Comments from jbauman. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppb_image_data_proxy.h ('k') | ppapi/thunk/ppb_image_data_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_image_data_proxy.cc
diff --git a/ppapi/proxy/ppb_image_data_proxy.cc b/ppapi/proxy/ppb_image_data_proxy.cc
index 926d37fca7cd6020ebd7bb2549905e9ec60b1995..02fdad6f7ef9b25b512042b40eab7d4d9121f445 100644
--- a/ppapi/proxy/ppb_image_data_proxy.cc
+++ b/ppapi/proxy/ppb_image_data_proxy.cc
@@ -347,7 +347,7 @@ PP_Bool ImageData::Describe(PP_ImageDataDesc* desc) {
return PP_TRUE;
}
-int32_t ImageData::GetSharedMemory(base::SharedMemoryHandle* /* handle */,
+int32_t ImageData::GetSharedMemory(base::SharedMemory** /* shm */,
uint32_t* /* byte_count */) {
// Not supported in the proxy (this method is for actually implementing the
// proxy in the host).
@@ -593,14 +593,15 @@ PP_Resource PPB_ImageData_Proxy::CreateImageData(
return 0;
}
- base::SharedMemoryHandle local_handle;
- if (enter_resource.object()->GetSharedMemory(&local_handle, byte_count) !=
+ base::SharedMemory* local_shm;
+ if (enter_resource.object()->GetSharedMemory(&local_shm, byte_count) !=
PP_OK) {
DVLOG(1) << "CreateImageData failed: could not GetSharedMemory";
return 0;
}
- *image_handle = dispatcher->ShareSharedMemoryHandleWithRemote(local_handle);
+ *image_handle =
+ dispatcher->ShareSharedMemoryHandleWithRemote(local_shm->handle());
return resource.Release();
}
« no previous file with comments | « ppapi/proxy/ppb_image_data_proxy.h ('k') | ppapi/thunk/ppb_image_data_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698