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" | 10 #include "content/common/content_param_traits.h" |
11 #include "content/common/gpu/establish_channel_params.h" | 11 #include "content/common/gpu/establish_channel_params.h" |
12 #include "content/common/gpu/gpu_memory_uma_stats.h" | 12 #include "content/common/gpu/gpu_memory_uma_stats.h" |
13 #include "content/common/gpu/gpu_process_launch_causes.h" | 13 #include "content/common/gpu/gpu_process_launch_causes.h" |
14 #include "content/public/common/common_param_traits.h" | 14 #include "content/public/common/common_param_traits.h" |
15 #include "content/public/common/gpu_memory_stats.h" | |
16 #include "gpu/command_buffer/common/sync_token.h" | 15 #include "gpu/command_buffer/common/sync_token.h" |
17 #include "gpu/command_buffer/common/value_state.h" | 16 #include "gpu/command_buffer/common/value_state.h" |
18 #include "gpu/config/gpu_info.h" | 17 #include "gpu/config/gpu_info.h" |
| 18 #include "gpu/ipc/common/memory_stats.h" |
19 #include "ipc/ipc_channel_handle.h" | 19 #include "ipc/ipc_channel_handle.h" |
20 #include "ipc/ipc_message_macros.h" | 20 #include "ipc/ipc_message_macros.h" |
21 #include "ipc/ipc_message_start.h" | 21 #include "ipc/ipc_message_start.h" |
22 #include "ui/gfx/gpu_memory_buffer.h" | 22 #include "ui/gfx/gpu_memory_buffer.h" |
23 #include "ui/gfx/ipc/gfx_param_traits.h" | 23 #include "ui/gfx/ipc/gfx_param_traits.h" |
24 #include "ui/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
26 | 26 |
27 #if defined(OS_MACOSX) | 27 #if defined(OS_MACOSX) |
28 #include "content/common/gpu/accelerated_surface_buffers_swapped_params_mac.h" | 28 #include "content/common/gpu/accelerated_surface_buffers_swapped_params_mac.h" |
29 #include "content/common/gpu/buffer_presented_params_mac.h" | 29 #include "content/common/gpu/buffer_presented_params_mac.h" |
30 #include "ui/base/cocoa/remote_layer_api.h" | 30 #include "ui/base/cocoa/remote_layer_api.h" |
31 #include "ui/gfx/mac/io_surface.h" | 31 #include "ui/gfx/mac/io_surface.h" |
32 #endif | 32 #endif |
33 | 33 |
34 #undef IPC_MESSAGE_EXPORT | 34 #undef IPC_MESSAGE_EXPORT |
35 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 35 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
36 | 36 |
37 #define IPC_MESSAGE_START GpuMsgStart | 37 #define IPC_MESSAGE_START GpuMsgStart |
38 | 38 |
39 IPC_ENUM_TRAITS_MAX_VALUE(content::CauseForGpuLaunch, | 39 IPC_ENUM_TRAITS_MAX_VALUE(content::CauseForGpuLaunch, |
40 content::CAUSE_FOR_GPU_LAUNCH_MAX_ENUM - 1) | 40 content::CAUSE_FOR_GPU_LAUNCH_MAX_ENUM - 1) |
41 | 41 |
42 IPC_STRUCT_TRAITS_BEGIN(content::GPUMemoryUmaStats) | 42 IPC_STRUCT_TRAITS_BEGIN(content::GPUMemoryUmaStats) |
43 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_current) | 43 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_current) |
44 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_max) | 44 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_max) |
45 IPC_STRUCT_TRAITS_END() | 45 IPC_STRUCT_TRAITS_END() |
46 | 46 |
47 IPC_STRUCT_TRAITS_BEGIN(content::GPUVideoMemoryUsageStats) | 47 IPC_STRUCT_TRAITS_BEGIN(gpu::VideoMemoryUsageStats) |
48 IPC_STRUCT_TRAITS_MEMBER(process_map) | 48 IPC_STRUCT_TRAITS_MEMBER(process_map) |
49 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated) | 49 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated) |
50 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_historical_max) | 50 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_historical_max) |
51 IPC_STRUCT_TRAITS_END() | 51 IPC_STRUCT_TRAITS_END() |
52 | 52 |
53 IPC_STRUCT_TRAITS_BEGIN(content::GPUVideoMemoryUsageStats::ProcessStats) | 53 IPC_STRUCT_TRAITS_BEGIN(gpu::VideoMemoryUsageStats::ProcessStats) |
54 IPC_STRUCT_TRAITS_MEMBER(video_memory) | 54 IPC_STRUCT_TRAITS_MEMBER(video_memory) |
55 IPC_STRUCT_TRAITS_MEMBER(has_duplicates) | 55 IPC_STRUCT_TRAITS_MEMBER(has_duplicates) |
56 IPC_STRUCT_TRAITS_END() | 56 IPC_STRUCT_TRAITS_END() |
57 | 57 |
58 IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBuffer_Params) | 58 IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBuffer_Params) |
59 IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id) | 59 IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id) |
60 IPC_STRUCT_MEMBER(gfx::Size, size) | 60 IPC_STRUCT_MEMBER(gfx::Size, size) |
61 IPC_STRUCT_MEMBER(gfx::BufferFormat, format) | 61 IPC_STRUCT_MEMBER(gfx::BufferFormat, format) |
62 IPC_STRUCT_MEMBER(gfx::BufferUsage, usage) | 62 IPC_STRUCT_MEMBER(gfx::BufferUsage, usage) |
63 IPC_STRUCT_MEMBER(int32_t, client_id) | 63 IPC_STRUCT_MEMBER(int32_t, client_id) |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 // Response from GPU to a GpuMsg_CreateGpuMemoryBuffer message. | 223 // Response from GPU to a GpuMsg_CreateGpuMemoryBuffer message. |
224 IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryBufferCreated, | 224 IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryBufferCreated, |
225 gfx::GpuMemoryBufferHandle /* handle */) | 225 gfx::GpuMemoryBufferHandle /* handle */) |
226 | 226 |
227 // Response from GPU to a GpuMsg_CollectGraphicsInfo. | 227 // Response from GPU to a GpuMsg_CollectGraphicsInfo. |
228 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, | 228 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, |
229 gpu::GPUInfo /* GPU logging stats */) | 229 gpu::GPUInfo /* GPU logging stats */) |
230 | 230 |
231 // Response from GPU to a GpuMsg_GetVideoMemory. | 231 // Response from GPU to a GpuMsg_GetVideoMemory. |
232 IPC_MESSAGE_CONTROL1(GpuHostMsg_VideoMemoryUsageStats, | 232 IPC_MESSAGE_CONTROL1(GpuHostMsg_VideoMemoryUsageStats, |
233 content::GPUVideoMemoryUsageStats /* GPU memory stats */) | 233 gpu::VideoMemoryUsageStats /* GPU memory stats */) |
234 | 234 |
235 #if defined(OS_MACOSX) | 235 #if defined(OS_MACOSX) |
236 // Tells the browser that an accelerated surface has swapped. | 236 // Tells the browser that an accelerated surface has swapped. |
237 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, | 237 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, |
238 content::AcceleratedSurfaceBuffersSwappedParams) | 238 content::AcceleratedSurfaceBuffersSwappedParams) |
239 #endif | 239 #endif |
240 | 240 |
241 #if defined(OS_WIN) | 241 #if defined(OS_WIN) |
242 IPC_MESSAGE_CONTROL2(GpuHostMsg_AcceleratedSurfaceCreatedChildWindow, | 242 IPC_MESSAGE_CONTROL2(GpuHostMsg_AcceleratedSurfaceCreatedChildWindow, |
243 gfx::PluginWindowHandle /* parent_window */, | 243 gfx::PluginWindowHandle /* parent_window */, |
(...skipping 23 matching lines...) Expand all Loading... |
267 // so the browser should stop sending the corresponding information | 267 // so the browser should stop sending the corresponding information |
268 IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription, | 268 IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription, |
269 int32_t /* client_id */, | 269 int32_t /* client_id */, |
270 unsigned int /* target */) | 270 unsigned int /* target */) |
271 | 271 |
272 // Message from GPU to add a GPU log message to the about:gpu page. | 272 // Message from GPU to add a GPU log message to the about:gpu page. |
273 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, | 273 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, |
274 int /*severity*/, | 274 int /*severity*/, |
275 std::string /* header */, | 275 std::string /* header */, |
276 std::string /* message */) | 276 std::string /* message */) |
OLD | NEW |