OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // Multiply-included message file, hence no include guard here, but see below | 5 // Multiply-included message file, hence no include guard here, but see below |
6 // for a much smaller-than-usual include guard section. | 6 // for a much smaller-than-usual include guard section. |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/common/content_param_traits.h" | 10 #include "content/common/content_param_traits.h" |
11 #include "content/common/gpu/establish_channel_params.h" | 11 #include "content/common/gpu/establish_channel_params.h" |
12 #include "content/common/gpu/gpu_memory_uma_stats.h" | 12 #include "content/common/gpu/gpu_memory_uma_stats.h" |
13 #include "content/common/gpu/gpu_process_launch_causes.h" | 13 #include "content/common/gpu/gpu_process_launch_causes.h" |
14 #include "content/public/common/common_param_traits.h" | 14 #include "content/public/common/common_param_traits.h" |
15 #include "gpu/command_buffer/common/sync_token.h" | 15 #include "gpu/command_buffer/common/sync_token.h" |
16 #include "gpu/command_buffer/common/value_state.h" | 16 #include "gpu/command_buffer/common/value_state.h" |
| 17 #include "gpu/command_buffer/service/gpu_preferences.h" |
17 #include "gpu/config/gpu_info.h" | 18 #include "gpu/config/gpu_info.h" |
18 #include "gpu/ipc/common/memory_stats.h" | 19 #include "gpu/ipc/common/memory_stats.h" |
19 #include "ipc/ipc_channel_handle.h" | 20 #include "ipc/ipc_channel_handle.h" |
20 #include "ipc/ipc_message_macros.h" | 21 #include "ipc/ipc_message_macros.h" |
21 #include "ipc/ipc_message_start.h" | 22 #include "ipc/ipc_message_start.h" |
22 #include "ui/gfx/gpu_memory_buffer.h" | 23 #include "ui/gfx/gpu_memory_buffer.h" |
23 #include "ui/gfx/ipc/gfx_param_traits.h" | 24 #include "ui/gfx/ipc/gfx_param_traits.h" |
24 #include "ui/gfx/native_widget_types.h" | 25 #include "ui/gfx/native_widget_types.h" |
25 #include "url/gurl.h" | 26 #include "url/gurl.h" |
26 #include "url/ipc/url_param_traits.h" | 27 #include "url/ipc/url_param_traits.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 IPC_STRUCT_TRAITS_END() | 94 IPC_STRUCT_TRAITS_END() |
94 | 95 |
95 IPC_STRUCT_TRAITS_BEGIN(content::BufferPresentedParams) | 96 IPC_STRUCT_TRAITS_BEGIN(content::BufferPresentedParams) |
96 // The vsync parameters, to synchronize presentation with the display. | 97 // The vsync parameters, to synchronize presentation with the display. |
97 IPC_STRUCT_TRAITS_MEMBER(surface_id) | 98 IPC_STRUCT_TRAITS_MEMBER(surface_id) |
98 IPC_STRUCT_TRAITS_MEMBER(vsync_timebase) | 99 IPC_STRUCT_TRAITS_MEMBER(vsync_timebase) |
99 IPC_STRUCT_TRAITS_MEMBER(vsync_interval) | 100 IPC_STRUCT_TRAITS_MEMBER(vsync_interval) |
100 IPC_STRUCT_TRAITS_END() | 101 IPC_STRUCT_TRAITS_END() |
101 #endif | 102 #endif |
102 | 103 |
| 104 IPC_STRUCT_TRAITS_BEGIN(gpu::GpuPreferences) |
| 105 IPC_STRUCT_TRAITS_MEMBER(single_process) |
| 106 IPC_STRUCT_TRAITS_MEMBER(in_process_gpu) |
| 107 IPC_STRUCT_TRAITS_MEMBER(ui_prioritize_in_gpu_process) |
| 108 IPC_STRUCT_TRAITS_MEMBER(compile_shader_always_succeeds) |
| 109 IPC_STRUCT_TRAITS_MEMBER(disable_gl_error_limit) |
| 110 IPC_STRUCT_TRAITS_MEMBER(disable_glsl_translator) |
| 111 IPC_STRUCT_TRAITS_MEMBER(disable_gpu_driver_bug_workarounds) |
| 112 IPC_STRUCT_TRAITS_MEMBER(disable_shader_name_hashing) |
| 113 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_command_logging) |
| 114 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_debugging) |
| 115 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_logging_gpu) |
| 116 IPC_STRUCT_TRAITS_MEMBER(disable_gpu_program_cache) |
| 117 IPC_STRUCT_TRAITS_MEMBER(enforce_gl_minimums) |
| 118 IPC_STRUCT_TRAITS_MEMBER(force_gpu_mem_available) |
| 119 IPC_STRUCT_TRAITS_MEMBER(gpu_program_cache_size) |
| 120 IPC_STRUCT_TRAITS_MEMBER(disable_gpu_shader_disk_cache) |
| 121 IPC_STRUCT_TRAITS_MEMBER(enable_share_group_async_texture_upload) |
| 122 IPC_STRUCT_TRAITS_MEMBER(enable_subscribe_uniform_extension) |
| 123 IPC_STRUCT_TRAITS_MEMBER(enable_threaded_texture_mailboxes) |
| 124 IPC_STRUCT_TRAITS_MEMBER(gl_shader_interm_output) |
| 125 IPC_STRUCT_TRAITS_MEMBER(emulate_shader_precision) |
| 126 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_logging) |
| 127 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_tracing) |
| 128 IPC_STRUCT_TRAITS_MEMBER(enable_unsafe_es3_apis) |
| 129 IPC_STRUCT_TRAITS_END() |
| 130 |
103 //------------------------------------------------------------------------------ | 131 //------------------------------------------------------------------------------ |
104 // GPU Messages | 132 // GPU Messages |
105 // These are messages from the browser to the GPU process. | 133 // These are messages from the browser to the GPU process. |
106 | 134 |
107 // Tells the GPU process to initialize itself. The browser explicitly | 135 // Tells the GPU process to initialize itself. The browser explicitly |
108 // requests this be done so that we are guaranteed that the channel is set | 136 // requests this be done so that we are guaranteed that the channel is set |
109 // up between the browser and GPU process before doing any work that might | 137 // up between the browser and GPU process before doing any work that might |
110 // potentially crash the GPU process. Detection of the child process | 138 // potentially crash the GPU process. Detection of the child process |
111 // exiting abruptly is predicated on having the IPC channel set up. | 139 // exiting abruptly is predicated on having the IPC channel set up. |
112 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) | 140 IPC_MESSAGE_CONTROL1(GpuMsg_Initialize, |
| 141 gpu::GpuPreferences /* gpu_prefernces */) |
113 | 142 |
114 // Tells the GPU process to shutdown itself. | 143 // Tells the GPU process to shutdown itself. |
115 IPC_MESSAGE_CONTROL0(GpuMsg_Finalize) | 144 IPC_MESSAGE_CONTROL0(GpuMsg_Finalize) |
116 | 145 |
117 // Tells the GPU process to create a new channel for communication with a | 146 // Tells the GPU process to create a new channel for communication with a |
118 // given client. The channel name is returned in a | 147 // given client. The channel name is returned in a |
119 // GpuHostMsg_ChannelEstablished message. The client ID is passed so | 148 // GpuHostMsg_ChannelEstablished message. The client ID is passed so |
120 // that the GPU process reuses an existing channel to that process if it exists. | 149 // that the GPU process reuses an existing channel to that process if it exists. |
121 // This ID is a unique opaque identifier generated by the browser process. | 150 // This ID is a unique opaque identifier generated by the browser process. |
122 // The client_tracing_id is a unique ID used for the purposes of tracing. | 151 // The client_tracing_id is a unique ID used for the purposes of tracing. |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // so the browser should stop sending the corresponding information | 296 // so the browser should stop sending the corresponding information |
268 IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription, | 297 IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription, |
269 int32_t /* client_id */, | 298 int32_t /* client_id */, |
270 unsigned int /* target */) | 299 unsigned int /* target */) |
271 | 300 |
272 // Message from GPU to add a GPU log message to the about:gpu page. | 301 // Message from GPU to add a GPU log message to the about:gpu page. |
273 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, | 302 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, |
274 int /*severity*/, | 303 int /*severity*/, |
275 std::string /* header */, | 304 std::string /* header */, |
276 std::string /* message */) | 305 std::string /* message */) |
OLD | NEW |