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