| 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 ddadbdf684addcc1808457645fb36da5a1b5656c..91a881e4421c9b95274c8b76bb8832b385c81d60 100644
|
| --- a/gpu/ipc/client/gpu_channel_host.cc
|
| +++ b/gpu/ipc/client/gpu_channel_host.cc
|
| @@ -242,9 +242,32 @@ gfx::GpuMemoryBufferHandle GpuChannelHost::ShareGpuMemoryBufferToGpuProcess(
|
| *requires_sync_point = false;
|
| return handle;
|
| }
|
| +#if defined(USE_OZONE)
|
| + case gfx::OZONE_NATIVE_PIXMAP: {
|
| + std::vector<base::ScopedFD> scoped_fds;
|
| + for (auto& fd : source_handle.native_pixmap_handle.fds) {
|
| + base::ScopedFD scoped_fd(HANDLE_EINTR(dup(fd.fd)));
|
| + if (!scoped_fd.is_valid()) {
|
| + PLOG(ERROR) << "dup";
|
| + return gfx::GpuMemoryBufferHandle();
|
| + }
|
| + scoped_fds.emplace_back(std::move(scoped_fd));
|
| + }
|
| + gfx::GpuMemoryBufferHandle handle;
|
| + handle.type = gfx::OZONE_NATIVE_PIXMAP;
|
| + handle.id = source_handle.id;
|
| + for (auto& scoped_fd : scoped_fds) {
|
| + handle.native_pixmap_handle.fds.emplace_back(scoped_fd.release(),
|
| + true /* auto_close */);
|
| + }
|
| + handle.native_pixmap_handle.strides_and_offsets =
|
| + source_handle.native_pixmap_handle.strides_and_offsets;
|
| + *requires_sync_point = false;
|
| + return handle;
|
| + }
|
| +#endif
|
| case gfx::IO_SURFACE_BUFFER:
|
| case gfx::SURFACE_TEXTURE_BUFFER:
|
| - case gfx::OZONE_NATIVE_PIXMAP:
|
| *requires_sync_point = true;
|
| return source_handle;
|
| default:
|
|
|