| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gpu/ipc/service/gpu_channel.h" | 5 #include "gpu/ipc/service/gpu_channel.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 return nullptr; | 1067 return nullptr; |
| 1068 | 1068 |
| 1069 return manager->gpu_memory_buffer_factory() | 1069 return manager->gpu_memory_buffer_factory() |
| 1070 ->AsImageFactory() | 1070 ->AsImageFactory() |
| 1071 ->CreateImageForGpuMemoryBuffer(handle, size, format, internalformat, | 1071 ->CreateImageForGpuMemoryBuffer(handle, size, format, internalformat, |
| 1072 client_id_, surface_handle); | 1072 client_id_, surface_handle); |
| 1073 } | 1073 } |
| 1074 } | 1074 } |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 std::unique_ptr<gl::GLFence> GpuChannel::CreateFenceForGpuFence( | 1077 scoped_refptr<gl::GLFence> GpuChannel::CreateFenceForGpuFence( |
| 1078 const gfx::GpuFenceHandle& handle) { | 1078 const gfx::GpuFenceHandle& handle) { |
| 1079 #if defined(OS_LINUX) | 1079 #if defined(OS_LINUX) |
| 1080 base::ScopedFD libsync_fd(handle.fd.fd); | 1080 base::ScopedFD libsync_fd(handle.fd.fd); |
| 1081 if (libsync_fd.is_valid()) | 1081 if (libsync_fd.is_valid()) |
| 1082 return base::MakeUnique<gl::GLFenceLibsync>(std::move(libsync_fd)); | 1082 return make_scoped_refptr(new gl::GLFenceLibsync(std::move(libsync_fd))); |
| 1083 #endif | 1083 #endif |
| 1084 | 1084 |
| 1085 return base::MakeUnique<gl::GLFenceSharedEvent>(handle.shared_event_handle); | 1085 return make_scoped_refptr( |
| 1086 new gl::GLFenceSharedEvent(handle.shared_event_handle)); |
| 1086 } | 1087 } |
| 1087 | 1088 |
| 1088 } // namespace gpu | 1089 } // namespace gpu |
| OLD | NEW |