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

Unified Diff: media/gpu/video_decode_accelerator_unittest.cc

Issue 2852803002: Remove base::SharedMemory::ShareToProcess. (Closed)
Patch Set: Rebase. Created 3 years, 8 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
Index: media/gpu/video_decode_accelerator_unittest.cc
diff --git a/media/gpu/video_decode_accelerator_unittest.cc b/media/gpu/video_decode_accelerator_unittest.cc
index 97ffb0595269d2795d1348af13b96dd0f8f93f52..3e7a976dd03c9871e111ff8aa49fa4c1a58fe5f8 100644
--- a/media/gpu/video_decode_accelerator_unittest.cc
+++ b/media/gpu/video_decode_accelerator_unittest.cc
@@ -1085,10 +1085,8 @@ void GLRenderingVDAClient::DecodeNextFragment() {
base::SharedMemory shm;
LOG_ASSERT(shm.CreateAndMapAnonymous(next_fragment_size));
memcpy(shm.memory(), next_fragment_bytes.data(), next_fragment_size);
- base::SharedMemoryHandle dup_handle;
- bool result =
- shm.ShareToProcess(base::GetCurrentProcessHandle(), &dup_handle);
- LOG_ASSERT(result);
+ base::SharedMemoryHandle dup_handle = shm.handle().Duplicate();
+ LOG_ASSERT(dup_handle.IsValid());
BitstreamBuffer bitstream_buffer(next_bitstream_buffer_id_, dup_handle,
Nico 2017/05/02 20:08:01 I tried to verify that BitstreamBuffer assumes own
erikchen 2017/05/02 21:33:10 Added a TODO
next_fragment_size);
decode_start_time_[next_bitstream_buffer_id_] = base::TimeTicks::Now();

Powered by Google App Engine
This is Rietveld 408576698