| Index: gpu/ipc/client/gpu_channel_host.cc
|
| diff --git a/gpu/ipc/client/gpu_channel_host.cc b/gpu/ipc/client/gpu_channel_host.cc
|
| index c44cd9ac61b3439a19bd111af9d935aca73002a7..850eaa30ed640e88d178d6ad97e5385035925a18 100644
|
| --- a/gpu/ipc/client/gpu_channel_host.cc
|
| +++ b/gpu/ipc/client/gpu_channel_host.cc
|
| @@ -286,8 +286,16 @@ int32_t GpuChannelHost::ReserveImageId() {
|
| gfx::GpuFenceHandle GpuChannelHost::ShareGpuFenceToGpuProcess(
|
| const gfx::GpuFenceHandle& source_handle) {
|
| gfx::GpuFenceHandle handle;
|
| - handle.shared_event_handle =
|
| - gfx::SharedEvent::DuplicateHandle(source_handle.shared_event_handle);
|
| + if (gfx::SharedEvent::IsHandleValid(source_handle.shared_event_handle)) {
|
| + handle.shared_event_handle =
|
| + gfx::SharedEvent::DuplicateHandle(source_handle.shared_event_handle);
|
| + }
|
| +#if defined(OS_LINUX)
|
| + if (source_handle.fd.fd >= 0) {
|
| + handle.fd.fd = HANDLE_EINTR(dup(source_handle.fd.fd));
|
| + handle.fd.auto_close = true;
|
| + }
|
| +#endif
|
| return handle;
|
| }
|
|
|
|
|