| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/common/gpu/gpu_memory_allocation.h" | 13 #include "content/common/gpu/gpu_memory_allocation.h" |
| 14 #include "content/common/gpu/gpu_process_launch_causes.h" | 14 #include "content/common/gpu/gpu_process_launch_causes.h" |
| 15 #include "content/public/common/common_param_traits.h" | 15 #include "content/public/common/common_param_traits.h" |
| 16 #include "content/public/common/gpu_info.h" | 16 #include "content/public/common/gpu_info.h" |
| 17 #include "content/public/common/gpu_mem_stats.h" |
| 17 #include "gpu/command_buffer/common/command_buffer.h" | 18 #include "gpu/command_buffer/common/command_buffer.h" |
| 18 #include "gpu/command_buffer/common/constants.h" | 19 #include "gpu/command_buffer/common/constants.h" |
| 19 #include "gpu/ipc/gpu_command_buffer_traits.h" | 20 #include "gpu/ipc/gpu_command_buffer_traits.h" |
| 20 #include "ipc/ipc_channel_handle.h" | 21 #include "ipc/ipc_channel_handle.h" |
| 21 #include "ipc/ipc_message_macros.h" | 22 #include "ipc/ipc_message_macros.h" |
| 22 #include "media/video/video_decode_accelerator.h" | 23 #include "media/video/video_decode_accelerator.h" |
| 23 #include "ui/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
| 24 #include "ui/gfx/size.h" | 25 #include "ui/gfx/size.h" |
| 25 #include "ui/gl/gpu_preference.h" | 26 #include "ui/gl/gpu_preference.h" |
| 26 #include "ui/surface/transport_dib.h" | 27 #include "ui/surface/transport_dib.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 IPC_STRUCT_TRAITS_MEMBER(gl_extensions) | 127 IPC_STRUCT_TRAITS_MEMBER(gl_extensions) |
| 127 IPC_STRUCT_TRAITS_MEMBER(can_lose_context) | 128 IPC_STRUCT_TRAITS_MEMBER(can_lose_context) |
| 128 IPC_STRUCT_TRAITS_MEMBER(gpu_accessible) | 129 IPC_STRUCT_TRAITS_MEMBER(gpu_accessible) |
| 129 IPC_STRUCT_TRAITS_MEMBER(performance_stats) | 130 IPC_STRUCT_TRAITS_MEMBER(performance_stats) |
| 130 IPC_STRUCT_TRAITS_MEMBER(software_rendering) | 131 IPC_STRUCT_TRAITS_MEMBER(software_rendering) |
| 131 #if defined(OS_WIN) | 132 #if defined(OS_WIN) |
| 132 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) | 133 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) |
| 133 #endif | 134 #endif |
| 134 IPC_STRUCT_TRAITS_END() | 135 IPC_STRUCT_TRAITS_END() |
| 135 | 136 |
| 137 IPC_STRUCT_TRAITS_BEGIN(content::GpuMemStats) |
| 138 IPC_STRUCT_TRAITS_MEMBER(total_bytes) |
| 139 IPC_STRUCT_TRAITS_MEMBER(currently_allocated_bytes) |
| 140 IPC_STRUCT_TRAITS_MEMBER(max_concurrently_allocated_bytes) |
| 141 IPC_STRUCT_TRAITS_END() |
| 142 |
| 136 IPC_STRUCT_TRAITS_BEGIN(GpuMemoryAllocationForRenderer) | 143 IPC_STRUCT_TRAITS_BEGIN(GpuMemoryAllocationForRenderer) |
| 137 IPC_STRUCT_TRAITS_MEMBER(gpu_resource_size_in_bytes) | 144 IPC_STRUCT_TRAITS_MEMBER(gpu_resource_size_in_bytes) |
| 138 IPC_STRUCT_TRAITS_MEMBER(suggest_have_backbuffer) | 145 IPC_STRUCT_TRAITS_MEMBER(suggest_have_backbuffer) |
| 139 IPC_STRUCT_TRAITS_END() | 146 IPC_STRUCT_TRAITS_END() |
| 140 | 147 |
| 141 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle) | 148 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle) |
| 142 IPC_STRUCT_TRAITS_MEMBER(handle) | 149 IPC_STRUCT_TRAITS_MEMBER(handle) |
| 143 IPC_STRUCT_TRAITS_MEMBER(transport) | 150 IPC_STRUCT_TRAITS_MEMBER(transport) |
| 144 IPC_STRUCT_TRAITS_MEMBER(parent_gpu_process_id) | 151 IPC_STRUCT_TRAITS_MEMBER(parent_gpu_process_id) |
| 145 IPC_STRUCT_TRAITS_MEMBER(parent_client_id) | 152 IPC_STRUCT_TRAITS_MEMBER(parent_client_id) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer, | 192 IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer, |
| 186 gfx::GLSurfaceHandle, /* compositing_surface */ | 193 gfx::GLSurfaceHandle, /* compositing_surface */ |
| 187 int32, /* surface_id */ | 194 int32, /* surface_id */ |
| 188 int32, /* client_id */ | 195 int32, /* client_id */ |
| 189 GPUCreateCommandBufferConfig /* init_params */) | 196 GPUCreateCommandBufferConfig /* init_params */) |
| 190 | 197 |
| 191 // Tells the GPU process to create a context for collecting graphics card | 198 // Tells the GPU process to create a context for collecting graphics card |
| 192 // information. | 199 // information. |
| 193 IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo) | 200 IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo) |
| 194 | 201 |
| 202 // Tells the GPU process to report memory usage statistics to the browser |
| 203 IPC_MESSAGE_CONTROL0(GpuMsg_GetMemStats) |
| 204 |
| 195 // Tells the GPU process that the browser process has finished resizing the | 205 // Tells the GPU process that the browser process has finished resizing the |
| 196 // view. | 206 // view. |
| 197 IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_ResizeViewACK) | 207 IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_ResizeViewACK) |
| 198 | 208 |
| 199 // Tells the GPU process that it's safe to start rendering to the surface. | 209 // Tells the GPU process that it's safe to start rendering to the surface. |
| 200 IPC_MESSAGE_ROUTED2(AcceleratedSurfaceMsg_NewACK, | 210 IPC_MESSAGE_ROUTED2(AcceleratedSurfaceMsg_NewACK, |
| 201 uint64 /* surface_handle */, | 211 uint64 /* surface_handle */, |
| 202 TransportDIB::Handle /* shared memory buffer */) | 212 TransportDIB::Handle /* shared memory buffer */) |
| 203 | 213 |
| 204 // Tells the GPU process that the browser process has handled the swap | 214 // Tells the GPU process that the browser process has handled the swap |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 256 |
| 247 // Request from GPU to free the browser resources associated with the | 257 // Request from GPU to free the browser resources associated with the |
| 248 // command buffer. | 258 // command buffer. |
| 249 IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyCommandBuffer, | 259 IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyCommandBuffer, |
| 250 int32 /* surface_id */) | 260 int32 /* surface_id */) |
| 251 | 261 |
| 252 // Response from GPU to a GpuMsg_CollectGraphicsInfo. | 262 // Response from GPU to a GpuMsg_CollectGraphicsInfo. |
| 253 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, | 263 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, |
| 254 content::GPUInfo /* GPU logging stats */) | 264 content::GPUInfo /* GPU logging stats */) |
| 255 | 265 |
| 266 // Response from GPU to a GpuMsg_GetMemStats. |
| 267 IPC_MESSAGE_CONTROL1(GpuHostMsg_MemStats, |
| 268 content::GpuMemStats /* GPU memory usage stats */) |
| 269 |
| 256 // Message from GPU to add a GPU log message to the about:gpu page. | 270 // Message from GPU to add a GPU log message to the about:gpu page. |
| 257 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, | 271 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, |
| 258 int /*severity*/, | 272 int /*severity*/, |
| 259 std::string /* header */, | 273 std::string /* header */, |
| 260 std::string /* message */) | 274 std::string /* message */) |
| 261 | 275 |
| 262 // Resize the window that is being drawn into. It's important that this | 276 // Resize the window that is being drawn into. It's important that this |
| 263 // resize be synchronized with the swapping of the front and back buffers. | 277 // resize be synchronized with the swapping of the front and back buffers. |
| 264 IPC_MESSAGE_CONTROL3(GpuHostMsg_ResizeView, | 278 IPC_MESSAGE_CONTROL3(GpuHostMsg_ResizeView, |
| 265 int32 /* surface_id */, | 279 int32 /* surface_id */, |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 545 |
| 532 // Confirm decoder has been flushed. | 546 // Confirm decoder has been flushed. |
| 533 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) | 547 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) |
| 534 | 548 |
| 535 // Confirm decoder has been reset. | 549 // Confirm decoder has been reset. |
| 536 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 550 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
| 537 | 551 |
| 538 // Video decoder has encountered an error. | 552 // Video decoder has encountered an error. |
| 539 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 553 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
| 540 uint32) /* Error ID */ | 554 uint32) /* Error ID */ |
| OLD | NEW |