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" | |
11 #include "gpu/command_buffer/common/sync_token.h" | 10 #include "gpu/command_buffer/common/sync_token.h" |
12 #include "gpu/command_buffer/service/gpu_preferences.h" | |
13 #include "gpu/config/gpu_feature_info.h" | 11 #include "gpu/config/gpu_feature_info.h" |
14 #include "gpu/config/gpu_info.h" | 12 #include "gpu/config/gpu_info.h" |
15 #include "gpu/ipc/common/gpu_command_buffer_traits.h" | |
16 #include "gpu/ipc/common/gpu_param_traits.h" | |
17 #include "gpu/ipc/common/memory_stats.h" | |
18 #include "gpu/ipc/common/surface_handle.h" | 13 #include "gpu/ipc/common/surface_handle.h" |
19 #include "ipc/ipc_channel_handle.h" | 14 #include "ipc/ipc_channel_handle.h" |
20 #include "ipc/ipc_message_macros.h" | 15 #include "ipc/ipc_message_macros.h" |
21 #include "ipc/ipc_message_start.h" | 16 #include "ipc/ipc_message_start.h" |
22 #include "media/media_features.h" | |
23 #include "ui/events/ipc/latency_info_param_traits.h" | |
24 #include "ui/gfx/gpu_memory_buffer.h" | 17 #include "ui/gfx/gpu_memory_buffer.h" |
25 #include "ui/gfx/ipc/gfx_param_traits.h" | 18 #include "ui/gfx/ipc/gfx_param_traits.h" |
26 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" | |
27 #include "url/gurl.h" | |
28 #include "url/ipc/url_param_traits.h" | |
29 | 19 |
30 #undef IPC_MESSAGE_EXPORT | 20 #undef IPC_MESSAGE_EXPORT |
31 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
32 | 22 |
33 #define IPC_MESSAGE_START GpuMsgStart | 23 #define IPC_MESSAGE_START GpuMsgStart |
34 | 24 |
35 IPC_ENUM_TRAITS_VALIDATE(gpu::GpuPreferences::VpxDecodeVendors, | |
36 ((value >= gpu::GpuPreferences::VPX_VENDOR_NONE) && | |
37 (value <= gpu::GpuPreferences::VPX_VENDOR_ALL))) | |
38 | |
39 IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBuffer_Params) | 25 IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBuffer_Params) |
40 IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id) | 26 IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id) |
41 IPC_STRUCT_MEMBER(gfx::Size, size) | 27 IPC_STRUCT_MEMBER(gfx::Size, size) |
42 IPC_STRUCT_MEMBER(gfx::BufferFormat, format) | 28 IPC_STRUCT_MEMBER(gfx::BufferFormat, format) |
43 IPC_STRUCT_MEMBER(gfx::BufferUsage, usage) | 29 IPC_STRUCT_MEMBER(gfx::BufferUsage, usage) |
44 IPC_STRUCT_MEMBER(int32_t, client_id) | 30 IPC_STRUCT_MEMBER(int32_t, client_id) |
45 IPC_STRUCT_MEMBER(gpu::SurfaceHandle, surface_handle) | 31 IPC_STRUCT_MEMBER(gpu::SurfaceHandle, surface_handle) |
46 IPC_STRUCT_END() | 32 IPC_STRUCT_END() |
47 | 33 |
48 IPC_STRUCT_TRAITS_BEGIN(gpu::GpuPreferences) | |
49 IPC_STRUCT_TRAITS_MEMBER(single_process) | |
50 IPC_STRUCT_TRAITS_MEMBER(in_process_gpu) | |
51 IPC_STRUCT_TRAITS_MEMBER(ui_prioritize_in_gpu_process) | |
52 IPC_STRUCT_TRAITS_MEMBER(disable_accelerated_video_decode) | |
53 #if defined(OS_CHROMEOS) | |
54 IPC_STRUCT_TRAITS_MEMBER(disable_vaapi_accelerated_video_encode) | |
55 #endif | |
56 #if BUILDFLAG(ENABLE_WEBRTC) | |
57 IPC_STRUCT_TRAITS_MEMBER(disable_web_rtc_hw_encoding) | |
58 #endif | |
59 #if defined(OS_WIN) | |
60 IPC_STRUCT_TRAITS_MEMBER(enable_accelerated_vpx_decode) | |
61 IPC_STRUCT_TRAITS_MEMBER(enable_low_latency_dxva) | |
62 IPC_STRUCT_TRAITS_MEMBER(enable_zero_copy_dxgi_video) | |
63 IPC_STRUCT_TRAITS_MEMBER(enable_nv12_dxgi_video) | |
64 #endif | |
65 IPC_STRUCT_TRAITS_MEMBER(compile_shader_always_succeeds) | |
66 IPC_STRUCT_TRAITS_MEMBER(disable_gl_error_limit) | |
67 IPC_STRUCT_TRAITS_MEMBER(disable_glsl_translator) | |
68 IPC_STRUCT_TRAITS_MEMBER(disable_gpu_driver_bug_workarounds) | |
69 IPC_STRUCT_TRAITS_MEMBER(disable_shader_name_hashing) | |
70 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_command_logging) | |
71 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_debugging) | |
72 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_logging_gpu) | |
73 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_driver_debug_logging) | |
74 IPC_STRUCT_TRAITS_MEMBER(disable_gpu_program_cache) | |
75 IPC_STRUCT_TRAITS_MEMBER(enforce_gl_minimums) | |
76 IPC_STRUCT_TRAITS_MEMBER(force_gpu_mem_available) | |
77 IPC_STRUCT_TRAITS_MEMBER(gpu_program_cache_size) | |
78 IPC_STRUCT_TRAITS_MEMBER(disable_gpu_shader_disk_cache) | |
79 IPC_STRUCT_TRAITS_MEMBER(enable_threaded_texture_mailboxes) | |
80 IPC_STRUCT_TRAITS_MEMBER(gl_shader_interm_output) | |
81 IPC_STRUCT_TRAITS_MEMBER(emulate_shader_precision) | |
82 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_logging) | |
83 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_tracing) | |
84 IPC_STRUCT_TRAITS_MEMBER(enable_es3_apis) | |
85 IPC_STRUCT_TRAITS_MEMBER(use_passthrough_cmd_decoder) | |
86 IPC_STRUCT_TRAITS_END() | |
87 | |
88 //------------------------------------------------------------------------------ | 34 //------------------------------------------------------------------------------ |
89 // GPU Messages | 35 // GPU Messages |
90 // These are messages from the browser to the GPU process. | 36 // These are messages from the browser to the GPU process. |
91 | 37 |
92 // Tells the GPU process to create a new gpu memory buffer. | 38 // Tells the GPU process to create a new gpu memory buffer. |
93 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBuffer, | 39 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBuffer, |
94 GpuMsg_CreateGpuMemoryBuffer_Params) | 40 GpuMsg_CreateGpuMemoryBuffer_Params) |
95 | 41 |
96 // Tells the GPU process to destroy buffer. | 42 // Tells the GPU process to destroy buffer. |
97 IPC_MESSAGE_CONTROL3(GpuMsg_DestroyGpuMemoryBuffer, | 43 IPC_MESSAGE_CONTROL3(GpuMsg_DestroyGpuMemoryBuffer, |
(...skipping 27 matching lines...) Expand all Loading... |
125 gpu::GPUInfo /* GPU logging stats */) | 71 gpu::GPUInfo /* GPU logging stats */) |
126 | 72 |
127 // Message from GPU to add a GPU log message to the about:gpu page. | 73 // Message from GPU to add a GPU log message to the about:gpu page. |
128 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, | 74 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, |
129 int /*severity*/, | 75 int /*severity*/, |
130 std::string /* header */, | 76 std::string /* header */, |
131 std::string /* message */) | 77 std::string /* message */) |
132 | 78 |
133 // Sent by the GPU process to indicate that a fields trial has been activated. | 79 // Sent by the GPU process to indicate that a fields trial has been activated. |
134 IPC_MESSAGE_CONTROL1(GpuHostMsg_FieldTrialActivated, std::string /* name */) | 80 IPC_MESSAGE_CONTROL1(GpuHostMsg_FieldTrialActivated, std::string /* name */) |
OLD | NEW |