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 24 matching lines...) Expand all Loading... |
35 #include "gpu/command_buffer/service/image_factory.h" | 35 #include "gpu/command_buffer/service/image_factory.h" |
36 #include "gpu/command_buffer/service/mailbox_manager.h" | 36 #include "gpu/command_buffer/service/mailbox_manager.h" |
37 #include "gpu/command_buffer/service/sync_point_manager.h" | 37 #include "gpu/command_buffer/service/sync_point_manager.h" |
38 #include "gpu/ipc/common/gpu_messages.h" | 38 #include "gpu/ipc/common/gpu_messages.h" |
39 #include "gpu/ipc/service/gpu_channel_manager.h" | 39 #include "gpu/ipc/service/gpu_channel_manager.h" |
40 #include "gpu/ipc/service/gpu_channel_manager_delegate.h" | 40 #include "gpu/ipc/service/gpu_channel_manager_delegate.h" |
41 #include "gpu/ipc/service/gpu_memory_buffer_factory.h" | 41 #include "gpu/ipc/service/gpu_memory_buffer_factory.h" |
42 #include "ipc/ipc_channel.h" | 42 #include "ipc/ipc_channel.h" |
43 #include "ipc/message_filter.h" | 43 #include "ipc/message_filter.h" |
44 #include "ui/gl/gl_context.h" | 44 #include "ui/gl/gl_context.h" |
| 45 #include "ui/gl/gl_fence.h" |
| 46 #include "ui/gl/gl_fence_shared_event.h" |
45 #include "ui/gl/gl_image_shared_memory.h" | 47 #include "ui/gl/gl_image_shared_memory.h" |
46 #include "ui/gl/gl_surface.h" | 48 #include "ui/gl/gl_surface.h" |
47 | 49 |
48 namespace gpu { | 50 namespace gpu { |
49 namespace { | 51 namespace { |
50 | 52 |
51 // Number of milliseconds between successive vsync. Many GL commands block | 53 // Number of milliseconds between successive vsync. Many GL commands block |
52 // on vsync, so thresholds for preemption should be multiples of this. | 54 // on vsync, so thresholds for preemption should be multiples of this. |
53 const int64_t kVsyncIntervalMs = 17; | 55 const int64_t kVsyncIntervalMs = 17; |
54 | 56 |
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 return nullptr; | 1058 return nullptr; |
1057 | 1059 |
1058 return manager->gpu_memory_buffer_factory() | 1060 return manager->gpu_memory_buffer_factory() |
1059 ->AsImageFactory() | 1061 ->AsImageFactory() |
1060 ->CreateImageForGpuMemoryBuffer(handle, size, format, internalformat, | 1062 ->CreateImageForGpuMemoryBuffer(handle, size, format, internalformat, |
1061 client_id_, surface_handle); | 1063 client_id_, surface_handle); |
1062 } | 1064 } |
1063 } | 1065 } |
1064 } | 1066 } |
1065 | 1067 |
| 1068 std::unique_ptr<gl::GLFence> GpuChannel::CreateFenceForGpuFence( |
| 1069 const gfx::GpuFenceHandle& handle) { |
| 1070 return base::MakeUnique<gl::GLFenceSharedEvent>(handle.shared_event_handle); |
| 1071 } |
| 1072 |
1066 } // namespace gpu | 1073 } // namespace gpu |
OLD | NEW |