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" | |
11 #include "content/common/gpu/establish_channel_params.h" | 10 #include "content/common/gpu/establish_channel_params.h" |
12 #include "content/common/gpu/gpu_memory_uma_stats.h" | 11 #include "content/common/gpu/gpu_memory_uma_stats.h" |
13 #include "content/common/gpu/gpu_process_launch_causes.h" | 12 #include "content/common/gpu/gpu_param_traits.h" |
14 #include "gpu/command_buffer/common/sync_token.h" | 13 #include "gpu/command_buffer/common/sync_token.h" |
15 #include "gpu/command_buffer/common/value_state.h" | 14 #include "gpu/command_buffer/common/value_state.h" |
16 #include "gpu/command_buffer/service/gpu_preferences.h" | 15 #include "gpu/command_buffer/service/gpu_preferences.h" |
17 #include "gpu/config/gpu_info.h" | 16 #include "gpu/config/gpu_info.h" |
| 17 #include "gpu/ipc/common/gpu_command_buffer_traits.h" |
18 #include "gpu/ipc/common/memory_stats.h" | 18 #include "gpu/ipc/common/memory_stats.h" |
19 #include "gpu/ipc/common/surface_handle.h" | 19 #include "gpu/ipc/common/surface_handle.h" |
20 #include "ipc/ipc_channel_handle.h" | 20 #include "ipc/ipc_channel_handle.h" |
21 #include "ipc/ipc_message_macros.h" | 21 #include "ipc/ipc_message_macros.h" |
22 #include "ipc/ipc_message_start.h" | 22 #include "ipc/ipc_message_start.h" |
| 23 #include "ui/events/ipc/latency_info_param_traits.h" |
23 #include "ui/gfx/gpu_memory_buffer.h" | 24 #include "ui/gfx/gpu_memory_buffer.h" |
24 #include "ui/gfx/ipc/gfx_param_traits.h" | 25 #include "ui/gfx/ipc/gfx_param_traits.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" |
27 | 28 |
28 #if defined(OS_MACOSX) | 29 #if defined(OS_MACOSX) |
29 #include "content/common/gpu/accelerated_surface_buffers_swapped_params_mac.h" | 30 #include "content/common/gpu/accelerated_surface_buffers_swapped_params_mac.h" |
30 #include "content/common/gpu/buffer_presented_params_mac.h" | 31 #include "content/common/gpu/buffer_presented_params_mac.h" |
31 #include "ui/base/cocoa/remote_layer_api.h" | 32 #include "ui/base/cocoa/remote_layer_api.h" |
32 #include "ui/gfx/mac/io_surface.h" | 33 #include "ui/gfx/mac/io_surface.h" |
33 #endif | 34 #endif |
34 | 35 |
35 #undef IPC_MESSAGE_EXPORT | 36 #undef IPC_MESSAGE_EXPORT |
36 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 37 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
37 | 38 |
38 #define IPC_MESSAGE_START GpuMsgStart | 39 #define IPC_MESSAGE_START GpuMsgStart |
39 | 40 |
40 IPC_ENUM_TRAITS_MAX_VALUE(content::CauseForGpuLaunch, | |
41 content::CAUSE_FOR_GPU_LAUNCH_MAX_ENUM - 1) | |
42 | |
43 IPC_STRUCT_TRAITS_BEGIN(content::GPUMemoryUmaStats) | 41 IPC_STRUCT_TRAITS_BEGIN(content::GPUMemoryUmaStats) |
44 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_current) | 42 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_current) |
45 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_max) | 43 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_max) |
46 IPC_STRUCT_TRAITS_END() | 44 IPC_STRUCT_TRAITS_END() |
47 | 45 |
48 IPC_STRUCT_TRAITS_BEGIN(gpu::VideoMemoryUsageStats) | 46 IPC_STRUCT_TRAITS_BEGIN(gpu::VideoMemoryUsageStats) |
49 IPC_STRUCT_TRAITS_MEMBER(process_map) | 47 IPC_STRUCT_TRAITS_MEMBER(process_map) |
50 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated) | 48 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated) |
51 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_historical_max) | 49 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_historical_max) |
52 IPC_STRUCT_TRAITS_END() | 50 IPC_STRUCT_TRAITS_END() |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // given client. The channel name is returned in a | 154 // given client. The channel name is returned in a |
157 // GpuHostMsg_ChannelEstablished message. The client ID is passed so | 155 // GpuHostMsg_ChannelEstablished message. The client ID is passed so |
158 // that the GPU process reuses an existing channel to that process if it exists. | 156 // that the GPU process reuses an existing channel to that process if it exists. |
159 // This ID is a unique opaque identifier generated by the browser process. | 157 // This ID is a unique opaque identifier generated by the browser process. |
160 // The client_tracing_id is a unique ID used for the purposes of tracing. | 158 // The client_tracing_id is a unique ID used for the purposes of tracing. |
161 IPC_MESSAGE_CONTROL1(GpuMsg_EstablishChannel, | 159 IPC_MESSAGE_CONTROL1(GpuMsg_EstablishChannel, |
162 content::EstablishChannelParams /* params */) | 160 content::EstablishChannelParams /* params */) |
163 | 161 |
164 // Tells the GPU process to close the channel identified by |client_id|. | 162 // Tells the GPU process to close the channel identified by |client_id|. |
165 // If no channel can be identified, do nothing. | 163 // If no channel can be identified, do nothing. |
166 IPC_MESSAGE_CONTROL1(GpuMsg_CloseChannel, | 164 IPC_MESSAGE_CONTROL1(GpuMsg_CloseChannel, int32_t /* client_id */) |
167 int32_t /* client_id */) | |
168 | 165 |
169 // Tells the GPU process to create a new gpu memory buffer. | 166 // Tells the GPU process to create a new gpu memory buffer. |
170 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBuffer, | 167 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBuffer, |
171 GpuMsg_CreateGpuMemoryBuffer_Params) | 168 GpuMsg_CreateGpuMemoryBuffer_Params) |
172 | 169 |
173 // Tells the GPU process to create a new gpu memory buffer from an existing | 170 // Tells the GPU process to create a new gpu memory buffer from an existing |
174 // handle. | 171 // handle. |
175 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBufferFromHandle, | 172 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBufferFromHandle, |
176 GpuMsg_CreateGpuMemoryBufferFromHandle_Params) | 173 GpuMsg_CreateGpuMemoryBufferFromHandle_Params) |
177 | 174 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // Sends an input event to the gpu service. | 215 // Sends an input event to the gpu service. |
219 IPC_MESSAGE_CONTROL3(GpuMsg_UpdateValueState, | 216 IPC_MESSAGE_CONTROL3(GpuMsg_UpdateValueState, |
220 int, /* client_id */ | 217 int, /* client_id */ |
221 unsigned int, /* target */ | 218 unsigned int, /* target */ |
222 gpu::ValueState /* valuestate */) | 219 gpu::ValueState /* valuestate */) |
223 | 220 |
224 //------------------------------------------------------------------------------ | 221 //------------------------------------------------------------------------------ |
225 // GPU Host Messages | 222 // GPU Host Messages |
226 // These are messages to the browser. | 223 // These are messages to the browser. |
227 | 224 |
228 // A renderer sends this when it wants to create a connection to the GPU | |
229 // process. The browser will create the GPU process if necessary, and will | |
230 // return a handle to the channel via a GpuChannelEstablished message. | |
231 IPC_SYNC_MESSAGE_CONTROL1_3(GpuHostMsg_EstablishGpuChannel, | |
232 content::CauseForGpuLaunch, | |
233 int /* client id */, | |
234 IPC::ChannelHandle /* handle to channel */, | |
235 gpu::GPUInfo /* stats about GPU process*/) | |
236 | |
237 // A renderer sends this when it wants to know whether a gpu process exists. | |
238 IPC_SYNC_MESSAGE_CONTROL0_1(GpuHostMsg_HasGpuProcess, bool /* result */) | |
239 | |
240 // Response from GPU to a GputMsg_Initialize message. | 225 // Response from GPU to a GputMsg_Initialize message. |
241 IPC_MESSAGE_CONTROL2(GpuHostMsg_Initialized, | 226 IPC_MESSAGE_CONTROL2(GpuHostMsg_Initialized, |
242 bool /* result */, | 227 bool /* result */, |
243 ::gpu::GPUInfo /* gpu_info */) | 228 ::gpu::GPUInfo /* gpu_info */) |
244 | 229 |
245 // Response from GPU to a GpuHostMsg_EstablishChannel message. | 230 // Response from GPU to a GpuHostMsg_EstablishChannel message. |
246 IPC_MESSAGE_CONTROL1(GpuHostMsg_ChannelEstablished, | 231 IPC_MESSAGE_CONTROL1(GpuHostMsg_ChannelEstablished, |
247 IPC::ChannelHandle /* channel_handle */) | 232 IPC::ChannelHandle /* channel_handle */) |
248 | 233 |
249 // Message from GPU to notify to destroy the channel. | 234 // Message from GPU to notify to destroy the channel. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 // so the browser should stop sending the corresponding information | 290 // so the browser should stop sending the corresponding information |
306 IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription, | 291 IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription, |
307 int32_t /* client_id */, | 292 int32_t /* client_id */, |
308 unsigned int /* target */) | 293 unsigned int /* target */) |
309 | 294 |
310 // Message from GPU to add a GPU log message to the about:gpu page. | 295 // Message from GPU to add a GPU log message to the about:gpu page. |
311 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, | 296 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, |
312 int /*severity*/, | 297 int /*severity*/, |
313 std::string /* header */, | 298 std::string /* header */, |
314 std::string /* message */) | 299 std::string /* message */) |
OLD | NEW |