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/establish_channel_params.h" | 10 #include "content/common/establish_channel_params.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_logging) | 99 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_logging) |
100 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_tracing) | 100 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_tracing) |
101 IPC_STRUCT_TRAITS_MEMBER(enable_es3_apis) | 101 IPC_STRUCT_TRAITS_MEMBER(enable_es3_apis) |
102 IPC_STRUCT_TRAITS_MEMBER(use_passthrough_cmd_decoder) | 102 IPC_STRUCT_TRAITS_MEMBER(use_passthrough_cmd_decoder) |
103 IPC_STRUCT_TRAITS_END() | 103 IPC_STRUCT_TRAITS_END() |
104 | 104 |
105 //------------------------------------------------------------------------------ | 105 //------------------------------------------------------------------------------ |
106 // GPU Messages | 106 // GPU Messages |
107 // These are messages from the browser to the GPU process. | 107 // These are messages from the browser to the GPU process. |
108 | 108 |
109 // Tells the GPU process to initialize itself. The browser explicitly | |
110 // requests this be done so that we are guaranteed that the channel is set | |
111 // up between the browser and GPU process before doing any work that might | |
112 // potentially crash the GPU process. Detection of the child process | |
113 // exiting abruptly is predicated on having the IPC channel set up. | |
114 IPC_MESSAGE_CONTROL1(GpuMsg_Initialize, | |
115 gpu::GpuPreferences /* gpu_prefernces */) | |
116 | |
117 // Tells the GPU process to shutdown itself. | 109 // Tells the GPU process to shutdown itself. |
118 IPC_MESSAGE_CONTROL0(GpuMsg_Finalize) | 110 IPC_MESSAGE_CONTROL0(GpuMsg_Finalize) |
119 | 111 |
120 // Tells the GPU process to create a new channel for communication with a | 112 // Tells the GPU process to create a new channel for communication with a |
121 // given client. The channel name is returned in a | 113 // given client. The channel name is returned in a |
122 // GpuHostMsg_ChannelEstablished message. The client ID is passed so | 114 // GpuHostMsg_ChannelEstablished message. The client ID is passed so |
123 // that the GPU process reuses an existing channel to that process if it exists. | 115 // that the GPU process reuses an existing channel to that process if it exists. |
124 // This ID is a unique opaque identifier generated by the browser process. | 116 // This ID is a unique opaque identifier generated by the browser process. |
125 // The client_tracing_id is a unique ID used for the purposes of tracing. | 117 // The client_tracing_id is a unique ID used for the purposes of tracing. |
126 IPC_MESSAGE_CONTROL1(GpuMsg_EstablishChannel, | 118 IPC_MESSAGE_CONTROL1(GpuMsg_EstablishChannel, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 165 |
174 // Response from GPU to a GputMsg_Initialize message. | 166 // Response from GPU to a GputMsg_Initialize message. |
175 IPC_MESSAGE_CONTROL2(GpuHostMsg_Initialized, | 167 IPC_MESSAGE_CONTROL2(GpuHostMsg_Initialized, |
176 bool /* result */, | 168 bool /* result */, |
177 ::gpu::GPUInfo /* gpu_info */) | 169 ::gpu::GPUInfo /* gpu_info */) |
178 | 170 |
179 // Response from GPU to a GpuHostMsg_EstablishChannel message. | 171 // Response from GPU to a GpuHostMsg_EstablishChannel message. |
180 IPC_MESSAGE_CONTROL1(GpuHostMsg_ChannelEstablished, | 172 IPC_MESSAGE_CONTROL1(GpuHostMsg_ChannelEstablished, |
181 IPC::ChannelHandle /* channel_handle */) | 173 IPC::ChannelHandle /* channel_handle */) |
182 | 174 |
183 // Message from GPU to notify to destroy the channel. | |
184 IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyChannel, int32_t /* client_id */) | |
185 | |
186 // Message to cache the given shader information. | |
187 IPC_MESSAGE_CONTROL3(GpuHostMsg_CacheShader, | |
188 int32_t /* client_id */, | |
189 std::string /* key */, | |
190 std::string /* shader */) | |
191 | |
192 // Message to the GPU that a shader was loaded from disk. | 175 // Message to the GPU that a shader was loaded from disk. |
193 IPC_MESSAGE_CONTROL1(GpuMsg_LoadedShader, std::string /* encoded shader */) | 176 IPC_MESSAGE_CONTROL1(GpuMsg_LoadedShader, std::string /* encoded shader */) |
194 | 177 |
195 // Response from GPU to a GpuMsg_CreateGpuMemoryBuffer message. | 178 // Response from GPU to a GpuMsg_CreateGpuMemoryBuffer message. |
196 IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryBufferCreated, | 179 IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryBufferCreated, |
197 gfx::GpuMemoryBufferHandle /* handle */) | 180 gfx::GpuMemoryBufferHandle /* handle */) |
198 | 181 |
199 // Response from GPU to a GpuMsg_CollectGraphicsInfo. | 182 // Response from GPU to a GpuMsg_CollectGraphicsInfo. |
200 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, | 183 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, |
201 gpu::GPUInfo /* GPU logging stats */) | 184 gpu::GPUInfo /* GPU logging stats */) |
202 | 185 |
203 // Response from GPU to a GpuMsg_GetVideoMemory. | 186 // Response from GPU to a GpuMsg_GetVideoMemory. |
204 IPC_MESSAGE_CONTROL1(GpuHostMsg_VideoMemoryUsageStats, | 187 IPC_MESSAGE_CONTROL1(GpuHostMsg_VideoMemoryUsageStats, |
205 gpu::VideoMemoryUsageStats /* GPU memory stats */) | 188 gpu::VideoMemoryUsageStats /* GPU memory stats */) |
206 | 189 |
207 #if defined(OS_WIN) | |
208 IPC_MESSAGE_CONTROL2(GpuHostMsg_AcceleratedSurfaceCreatedChildWindow, | |
209 gpu::SurfaceHandle /* parent_window */, | |
210 gpu::SurfaceHandle /* child_window */) | |
211 #endif | |
212 | |
213 #if defined(OS_ANDROID) | 190 #if defined(OS_ANDROID) |
214 // Response to a GpuMsg_DestroyingVideoSurface message. | 191 // Response to a GpuMsg_DestroyingVideoSurface message. |
215 IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyingVideoSurfaceAck, | 192 IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyingVideoSurfaceAck, |
216 int /* surface_id */) | 193 int /* surface_id */) |
217 #endif | 194 #endif |
218 | 195 |
219 | |
220 IPC_MESSAGE_CONTROL1(GpuHostMsg_DidCreateOffscreenContext, GURL /* url */) | |
221 | |
222 IPC_MESSAGE_CONTROL3(GpuHostMsg_DidLoseContext, | |
223 bool /* offscreen */, | |
224 gpu::error::ContextLostReason /* reason */, | |
225 GURL /* url */) | |
226 | |
227 IPC_MESSAGE_CONTROL1(GpuHostMsg_DidDestroyOffscreenContext, GURL /* url */) | |
228 | |
229 // Message from GPU to add a GPU log message to the about:gpu page. | 196 // Message from GPU to add a GPU log message to the about:gpu page. |
230 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, | 197 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, |
231 int /*severity*/, | 198 int /*severity*/, |
232 std::string /* header */, | 199 std::string /* header */, |
233 std::string /* message */) | 200 std::string /* message */) |
234 | 201 |
235 // Sent by the GPU process to indicate that a fields trial has been activated. | 202 // Sent by the GPU process to indicate that a fields trial has been activated. |
236 IPC_MESSAGE_CONTROL1(GpuHostMsg_FieldTrialActivated, std::string /* name */) | 203 IPC_MESSAGE_CONTROL1(GpuHostMsg_FieldTrialActivated, std::string /* name */) |
OLD | NEW |