| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <vector> | 8 #include <vector> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #define IPC_MESSAGE_START GpuMsgStart | 26 #define IPC_MESSAGE_START GpuMsgStart |
| 27 | 27 |
| 28 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) | 28 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) |
| 29 IPC_STRUCT_MEMBER(int32, share_group_id) | 29 IPC_STRUCT_MEMBER(int32, share_group_id) |
| 30 IPC_STRUCT_MEMBER(std::string, allowed_extensions) | 30 IPC_STRUCT_MEMBER(std::string, allowed_extensions) |
| 31 IPC_STRUCT_MEMBER(std::vector<int>, attribs) | 31 IPC_STRUCT_MEMBER(std::vector<int>, attribs) |
| 32 IPC_STRUCT_MEMBER(GURL, active_url) | 32 IPC_STRUCT_MEMBER(GURL, active_url) |
| 33 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference) | 33 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference) |
| 34 IPC_STRUCT_END() | 34 IPC_STRUCT_END() |
| 35 | 35 |
| 36 #if defined(OS_MACOSX) | |
| 37 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceNew_Params) | |
| 38 IPC_STRUCT_MEMBER(int32, renderer_id) | |
| 39 IPC_STRUCT_MEMBER(int32, render_view_id) | |
| 40 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) | |
| 41 IPC_STRUCT_MEMBER(int32, width) | |
| 42 IPC_STRUCT_MEMBER(int32, height) | |
| 43 IPC_STRUCT_MEMBER(uint64, surface_id) | |
| 44 IPC_STRUCT_MEMBER(bool, create_transport_dib) | |
| 45 IPC_STRUCT_MEMBER(int32, route_id) | |
| 46 IPC_STRUCT_END() | |
| 47 | |
| 48 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params) | |
| 49 IPC_STRUCT_MEMBER(int32, renderer_id) | |
| 50 IPC_STRUCT_MEMBER(int32, render_view_id) | |
| 51 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) | |
| 52 IPC_STRUCT_MEMBER(uint64, surface_id) | |
| 53 IPC_STRUCT_MEMBER(int32, route_id) | |
| 54 IPC_STRUCT_END() | |
| 55 | |
| 56 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceRelease_Params) | |
| 57 IPC_STRUCT_MEMBER(int32, renderer_id) | |
| 58 IPC_STRUCT_MEMBER(int32, render_view_id) | |
| 59 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) | |
| 60 IPC_STRUCT_MEMBER(uint64, identifier) | |
| 61 IPC_STRUCT_MEMBER(int32, route_id) | |
| 62 IPC_STRUCT_END() | |
| 63 #endif | |
| 64 | |
| 65 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | |
| 66 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceNew_Params) | 36 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceNew_Params) |
| 67 IPC_STRUCT_MEMBER(int32, renderer_id) | 37 IPC_STRUCT_MEMBER(int32, renderer_id) |
| 68 IPC_STRUCT_MEMBER(int32, render_view_id) | 38 IPC_STRUCT_MEMBER(int32, render_view_id) |
| 69 IPC_STRUCT_MEMBER(int32, width) | 39 IPC_STRUCT_MEMBER(int32, width) |
| 70 IPC_STRUCT_MEMBER(int32, height) | 40 IPC_STRUCT_MEMBER(int32, height) |
| 71 IPC_STRUCT_MEMBER(uint64, surface_id) | 41 IPC_STRUCT_MEMBER(uint64, surface_id) |
| 72 IPC_STRUCT_MEMBER(int32, route_id) | 42 IPC_STRUCT_MEMBER(int32, route_id) |
| 43 #if defined(OS_MACOSX) |
| 44 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) |
| 45 IPC_STRUCT_MEMBER(bool, create_transport_dib) |
| 46 #endif |
| 73 IPC_STRUCT_END() | 47 IPC_STRUCT_END() |
| 74 | 48 |
| 75 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params) | 49 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params) |
| 76 IPC_STRUCT_MEMBER(int32, renderer_id) | 50 IPC_STRUCT_MEMBER(int32, renderer_id) |
| 77 IPC_STRUCT_MEMBER(int32, render_view_id) | 51 IPC_STRUCT_MEMBER(int32, render_view_id) |
| 78 IPC_STRUCT_MEMBER(uint64, surface_id) | 52 IPC_STRUCT_MEMBER(uint64, surface_id) |
| 79 IPC_STRUCT_MEMBER(int32, route_id) | 53 IPC_STRUCT_MEMBER(int32, route_id) |
| 54 #if defined(OS_WIN) |
| 55 IPC_STRUCT_MEMBER(gfx::Size, size) |
| 56 #elif defined(OS_MACOSX) |
| 57 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) |
| 58 #endif |
| 80 IPC_STRUCT_END() | 59 IPC_STRUCT_END() |
| 81 | 60 |
| 82 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceRelease_Params) | 61 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceRelease_Params) |
| 83 IPC_STRUCT_MEMBER(int32, renderer_id) | 62 IPC_STRUCT_MEMBER(int32, renderer_id) |
| 84 IPC_STRUCT_MEMBER(int32, render_view_id) | 63 IPC_STRUCT_MEMBER(int32, render_view_id) |
| 85 IPC_STRUCT_MEMBER(uint64, identifier) | 64 IPC_STRUCT_MEMBER(uint64, identifier) |
| 86 IPC_STRUCT_MEMBER(int32, route_id) | 65 IPC_STRUCT_MEMBER(int32, route_id) |
| 66 #if defined(OS_MACOSX) |
| 67 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) |
| 68 #endif |
| 87 IPC_STRUCT_END() | 69 IPC_STRUCT_END() |
| 88 #endif | |
| 89 | 70 |
| 90 IPC_STRUCT_TRAITS_BEGIN(content::DxDiagNode) | 71 IPC_STRUCT_TRAITS_BEGIN(content::DxDiagNode) |
| 91 IPC_STRUCT_TRAITS_MEMBER(values) | 72 IPC_STRUCT_TRAITS_MEMBER(values) |
| 92 IPC_STRUCT_TRAITS_MEMBER(children) | 73 IPC_STRUCT_TRAITS_MEMBER(children) |
| 93 IPC_STRUCT_TRAITS_END() | 74 IPC_STRUCT_TRAITS_END() |
| 94 | 75 |
| 95 IPC_STRUCT_TRAITS_BEGIN(content::GPUInfo) | 76 IPC_STRUCT_TRAITS_BEGIN(content::GPUInfo) |
| 96 IPC_STRUCT_TRAITS_MEMBER(finalized) | 77 IPC_STRUCT_TRAITS_MEMBER(finalized) |
| 97 IPC_STRUCT_TRAITS_MEMBER(initialization_time) | 78 IPC_STRUCT_TRAITS_MEMBER(initialization_time) |
| 98 IPC_STRUCT_TRAITS_MEMBER(vendor_id) | 79 IPC_STRUCT_TRAITS_MEMBER(vendor_id) |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer, | 134 IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer, |
| 154 gfx::PluginWindowHandle, /* compositing_surface */ | 135 gfx::PluginWindowHandle, /* compositing_surface */ |
| 155 int32, /* render_view_id */ | 136 int32, /* render_view_id */ |
| 156 int32, /* renderer_id */ | 137 int32, /* renderer_id */ |
| 157 GPUCreateCommandBufferConfig /* init_params */) | 138 GPUCreateCommandBufferConfig /* init_params */) |
| 158 | 139 |
| 159 // Tells the GPU process to create a context for collecting graphics card | 140 // Tells the GPU process to create a context for collecting graphics card |
| 160 // information. | 141 // information. |
| 161 IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo) | 142 IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo) |
| 162 | 143 |
| 163 #if defined(TOOLKIT_USES_GTK) && !defined(UI_COMPOSITOR_IMAGE_TRANSPORT) || \ | |
| 164 defined(OS_WIN) | |
| 165 // Tells the GPU process that the browser process has finished resizing the | 144 // Tells the GPU process that the browser process has finished resizing the |
| 166 // view. | 145 // view. |
| 167 IPC_MESSAGE_CONTROL2(GpuMsg_ResizeViewACK, | 146 IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_ResizeViewACK) |
| 168 int32 /* renderer_id */, | |
| 169 int32 /* command_buffer_id */) | |
| 170 #endif | |
| 171 | 147 |
| 172 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | |
| 173 // Tells the GPU process that it's safe to start rendering to the surface. | 148 // Tells the GPU process that it's safe to start rendering to the surface. |
| 174 IPC_MESSAGE_ROUTED2(AcceleratedSurfaceMsg_NewACK, | 149 IPC_MESSAGE_ROUTED2(AcceleratedSurfaceMsg_NewACK, |
| 175 uint64 /* surface_id */, | 150 uint64 /* surface_id */, |
| 176 TransportDIB::Handle /* shared memory buffer */) | 151 TransportDIB::Handle /* shared memory buffer */) |
| 177 | 152 |
| 178 // Tells the GPU process that the browser process handled the swap | 153 // Tells the GPU process that the browser process handled the swap |
| 179 // buffers request with the given number. | 154 // buffers request with the given number. |
| 180 IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_BuffersSwappedACK) | 155 IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_BuffersSwappedACK) |
| 181 #endif | |
| 182 | 156 |
| 183 // Tells the GPU process to remove all contexts. | 157 // Tells the GPU process to remove all contexts. |
| 184 IPC_MESSAGE_CONTROL0(GpuMsg_Clean) | 158 IPC_MESSAGE_CONTROL0(GpuMsg_Clean) |
| 185 | 159 |
| 186 // Tells the GPU process to crash. | 160 // Tells the GPU process to crash. |
| 187 IPC_MESSAGE_CONTROL0(GpuMsg_Crash) | 161 IPC_MESSAGE_CONTROL0(GpuMsg_Crash) |
| 188 | 162 |
| 189 // Tells the GPU process to hang. | 163 // Tells the GPU process to hang. |
| 190 IPC_MESSAGE_CONTROL0(GpuMsg_Hang) | 164 IPC_MESSAGE_CONTROL0(GpuMsg_Hang) |
| 191 | 165 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 // Response from GPU to a GpuMsg_CollectGraphicsInfo. | 201 // Response from GPU to a GpuMsg_CollectGraphicsInfo. |
| 228 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, | 202 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, |
| 229 content::GPUInfo /* GPU logging stats */) | 203 content::GPUInfo /* GPU logging stats */) |
| 230 | 204 |
| 231 // Message from GPU to add a GPU log message to the about:gpu page. | 205 // Message from GPU to add a GPU log message to the about:gpu page. |
| 232 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, | 206 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, |
| 233 int /*severity*/, | 207 int /*severity*/, |
| 234 std::string /* header */, | 208 std::string /* header */, |
| 235 std::string /* message */) | 209 std::string /* message */) |
| 236 | 210 |
| 237 #if defined(TOOLKIT_USES_GTK) && !defined(UI_COMPOSITOR_IMAGE_TRANSPORT) || \ | |
| 238 defined(OS_WIN) | |
| 239 // Resize the window that is being drawn into. It's important that this | 211 // Resize the window that is being drawn into. It's important that this |
| 240 // resize be synchronized with the swapping of the front and back buffers. | 212 // resize be synchronized with the swapping of the front and back buffers. |
| 241 IPC_MESSAGE_CONTROL4(GpuHostMsg_ResizeView, | 213 IPC_MESSAGE_CONTROL4(GpuHostMsg_ResizeView, |
| 242 int32 /* renderer_id */, | 214 int32 /* renderer_id */, |
| 243 int32 /* render_view_id */, | 215 int32 /* render_view_id */, |
| 244 int32 /* command_buffer_route_id */, | 216 int32 /* route_id */, |
| 245 gfx::Size /* size */) | 217 gfx::Size /* size */) |
| 246 #endif | |
| 247 | 218 |
| 248 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | |
| 249 // This message is sent from the GPU process to the browser to notify about a | 219 // This message is sent from the GPU process to the browser to notify about a |
| 250 // new or resized surface in the GPU. The browser allocates any resources | 220 // new or resized surface in the GPU. The browser allocates any resources |
| 251 // needed for it on its end and replies with an ACK containing any shared | 221 // needed for it on its end and replies with an ACK containing any shared |
| 252 // resources/identifiers to be used in the GPU. | 222 // resources/identifiers to be used in the GPU. |
| 253 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceNew, | 223 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceNew, |
| 254 GpuHostMsg_AcceleratedSurfaceNew_Params) | 224 GpuHostMsg_AcceleratedSurfaceNew_Params) |
| 255 | 225 |
| 256 // This message notifies the browser process that the renderer | 226 // This message notifies the browser process that the renderer |
| 257 // swapped the buffers associated with the given "window", which | 227 // swapped the buffers associated with the given "window", which |
| 258 // should cause the browser to redraw the compositor's contents. | 228 // should cause the browser to redraw the compositor's contents. |
| 259 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, | 229 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, |
| 260 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params) | 230 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params) |
| 261 | 231 |
| 262 // Tells the browser to release whatever resources are associated with | 232 // Tells the browser to release whatever resources are associated with |
| 263 // the given surface. The browser must send an ACK once this operation | 233 // the given surface. The browser must send an ACK once this operation |
| 264 // is complete. | 234 // is complete. |
| 265 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceRelease, | 235 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceRelease, |
| 266 GpuHostMsg_AcceleratedSurfaceRelease_Params) | 236 GpuHostMsg_AcceleratedSurfaceRelease_Params) |
| 267 #endif | |
| 268 | 237 |
| 269 //------------------------------------------------------------------------------ | 238 //------------------------------------------------------------------------------ |
| 270 // GPU Channel Messages | 239 // GPU Channel Messages |
| 271 // These are messages from a renderer process to the GPU process. | 240 // These are messages from a renderer process to the GPU process. |
| 272 | 241 |
| 273 // Initialize a channel between a renderer process and a GPU process. The | 242 // Initialize a channel between a renderer process and a GPU process. The |
| 274 // renderer passes its process handle to the GPU process, which gives gives the | 243 // renderer passes its process handle to the GPU process, which gives gives the |
| 275 // GPU process the ability to map handles from the renderer process. This must | 244 // GPU process the ability to map handles from the renderer process. This must |
| 276 // be the first message sent on a newly connected channel. | 245 // be the first message sent on a newly connected channel. |
| 277 IPC_MESSAGE_CONTROL1(GpuChannelMsg_Initialize, | 246 IPC_MESSAGE_CONTROL1(GpuChannelMsg_Initialize, |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 | 486 |
| 518 // Confirm decoder has been reset. | 487 // Confirm decoder has been reset. |
| 519 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 488 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
| 520 | 489 |
| 521 // Decoder has faced end of stream marker in the stream. | 490 // Decoder has faced end of stream marker in the stream. |
| 522 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) | 491 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) |
| 523 | 492 |
| 524 // Video decoder has encountered an error. | 493 // Video decoder has encountered an error. |
| 525 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 494 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
| 526 uint32) /* Error ID */ | 495 uint32) /* Error ID */ |
| OLD | NEW |