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

Unified Diff: content/renderer/pepper/pepper_video_source_host.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 | « content/renderer/pepper/pepper_compositor_host.cc ('k') | content/renderer/pepper/ppb_image_data_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_video_source_host.cc
diff --git a/content/renderer/pepper/pepper_video_source_host.cc b/content/renderer/pepper/pepper_video_source_host.cc
index f6942a8592bbbade57d2b1634a4a128128c4801b..bf6226109ee9dacf35113be2723f99e5df9cf5e8 100644
--- a/content/renderer/pepper/pepper_video_source_host.cc
+++ b/content/renderer/pepper/pepper_video_source_host.cc
@@ -127,8 +127,8 @@ void PepperVideoSourceHost::SendGetFrameReply() {
// We have already allocated the correct size in shared memory. We need to
// duplicate the handle for IPC however, which will close down the
// duplicated handle when it's done.
- base::SharedMemoryHandle local_handle;
- if (shared_image_->GetSharedMemory(&local_handle, &byte_count) != PP_OK) {
+ base::SharedMemory* local_shm;
+ if (shared_image_->GetSharedMemory(&local_shm, &byte_count) != PP_OK) {
SendGetFrameErrorReply(PP_ERROR_FAILED);
return;
}
@@ -140,7 +140,8 @@ void PepperVideoSourceHost::SendGetFrameReply() {
return;
}
- image_handle = dispatcher->ShareSharedMemoryHandleWithRemote(local_handle);
+ image_handle =
+ dispatcher->ShareSharedMemoryHandleWithRemote(local_shm->handle());
} else {
// We need to allocate new shared memory.
shared_image_ = NULL; // Release any previous image.
« no previous file with comments | « content/renderer/pepper/pepper_compositor_host.cc ('k') | content/renderer/pepper/ppb_image_data_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698