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 27 matching lines...) Expand all Loading... |
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_image_shared_memory.h" | 45 #include "ui/gl/gl_image_shared_memory.h" |
46 #include "ui/gl/gl_surface.h" | 46 #include "ui/gl/gl_surface.h" |
47 | 47 |
48 #if defined(OS_POSIX) | |
49 #include "ipc/ipc_channel_posix.h" | |
50 #endif | |
51 | |
52 namespace gpu { | 48 namespace gpu { |
53 namespace { | 49 namespace { |
54 | 50 |
55 // Number of milliseconds between successive vsync. Many GL commands block | 51 // Number of milliseconds between successive vsync. Many GL commands block |
56 // on vsync, so thresholds for preemption should be multiples of this. | 52 // on vsync, so thresholds for preemption should be multiples of this. |
57 const int64_t kVsyncIntervalMs = 17; | 53 const int64_t kVsyncIntervalMs = 17; |
58 | 54 |
59 // Amount of time that we will wait for an IPC to be processed before | 55 // Amount of time that we will wait for an IPC to be processed before |
60 // preempting. After a preemption, we must wait this long before triggering | 56 // preempting. After a preemption, we must wait this long before triggering |
61 // another preemption. | 57 // another preemption. |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 | 1053 |
1058 return manager->gpu_memory_buffer_factory() | 1054 return manager->gpu_memory_buffer_factory() |
1059 ->AsImageFactory() | 1055 ->AsImageFactory() |
1060 ->CreateImageForGpuMemoryBuffer(handle, size, format, internalformat, | 1056 ->CreateImageForGpuMemoryBuffer(handle, size, format, internalformat, |
1061 client_id_, surface_handle); | 1057 client_id_, surface_handle); |
1062 } | 1058 } |
1063 } | 1059 } |
1064 } | 1060 } |
1065 | 1061 |
1066 } // namespace gpu | 1062 } // namespace gpu |
OLD | NEW |