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

Unified Diff: chrome/gpu/arc_gpu_video_decode_accelerator.cc

Issue 2859843002: Add a GUID to base::SharedMemoryHandle. (Closed)
Patch Set: fix guid on android. Created 3 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 | « base/metrics/field_trial.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/arc_gpu_video_decode_accelerator.cc
diff --git a/chrome/gpu/arc_gpu_video_decode_accelerator.cc b/chrome/gpu/arc_gpu_video_decode_accelerator.cc
index d0212aef014d6768ec1769fef8950d00650ab180..63e8ff83e7a913f0bb076255aedb6b28c8b4f091 100644
--- a/chrome/gpu/arc_gpu_video_decode_accelerator.cc
+++ b/chrome/gpu/arc_gpu_video_decode_accelerator.cc
@@ -9,6 +9,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/numerics/safe_math.h"
#include "base/run_loop.h"
+#include "base/unguessable_token.h"
#include "media/base/video_frame.h"
#include "media/gpu/gpu_video_decode_accelerator_factory.h"
@@ -295,9 +296,14 @@ void ArcGpuVideoDecodeAccelerator::UseBuffer(PortType port,
return;
}
CreateInputRecord(bitstream_buffer_id, index, metadata.timestamp);
+ // TODO(rockot): Pass GUIDs through Mojo. https://crbug.com/713763.
+ // TODO(erikchen): This fd comes from a mojo::ScopedHandle in
+ // GpuArcVideoService::BindSharedMemory. That should be passed through,
+ // rather than pulling out the fd. https://crbug.com/713763.
+ base::UnguessableToken guid = base::UnguessableToken::Create();
vda_->Decode(media::BitstreamBuffer(
bitstream_buffer_id,
- base::SharedMemoryHandle(base::FileDescriptor(dup_fd, true)),
+ base::SharedMemoryHandle(base::FileDescriptor(dup_fd, true), guid),
metadata.bytes_used, input_info->offset));
break;
}
« no previous file with comments | « base/metrics/field_trial.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698