Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: content/common/gpu_host_messages.h

Issue 1962493002: Make Mac swap code like other platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/buffer_presented_params_mac.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 10 #include "content/common/establish_channel_params.h"
11 #include "gpu/command_buffer/common/sync_token.h" 11 #include "gpu/command_buffer/common/sync_token.h"
12 #include "gpu/command_buffer/service/gpu_preferences.h" 12 #include "gpu/command_buffer/service/gpu_preferences.h"
13 #include "gpu/config/gpu_info.h" 13 #include "gpu/config/gpu_info.h"
14 #include "gpu/ipc/common/gpu_command_buffer_traits.h" 14 #include "gpu/ipc/common/gpu_command_buffer_traits.h"
15 #include "gpu/ipc/common/gpu_memory_uma_stats.h" 15 #include "gpu/ipc/common/gpu_memory_uma_stats.h"
16 #include "gpu/ipc/common/gpu_param_traits.h" 16 #include "gpu/ipc/common/gpu_param_traits.h"
17 #include "gpu/ipc/common/memory_stats.h" 17 #include "gpu/ipc/common/memory_stats.h"
18 #include "gpu/ipc/common/surface_handle.h" 18 #include "gpu/ipc/common/surface_handle.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/events/ipc/latency_info_param_traits.h" 22 #include "ui/events/ipc/latency_info_param_traits.h"
23 #include "ui/gfx/gpu_memory_buffer.h" 23 #include "ui/gfx/gpu_memory_buffer.h"
24 #include "ui/gfx/ipc/gfx_param_traits.h" 24 #include "ui/gfx/ipc/gfx_param_traits.h"
25 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" 25 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h"
26 #include "url/gurl.h" 26 #include "url/gurl.h"
27 #include "url/ipc/url_param_traits.h" 27 #include "url/ipc/url_param_traits.h"
28 28
29 #if defined(OS_MACOSX)
30 #include "content/common/accelerated_surface_buffers_swapped_params_mac.h"
31 #include "content/common/buffer_presented_params_mac.h"
32 #include "ui/base/cocoa/remote_layer_api.h"
33 #include "ui/gfx/mac/io_surface.h"
34 #endif
35
36 #undef IPC_MESSAGE_EXPORT 29 #undef IPC_MESSAGE_EXPORT
37 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 30 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
38 31
39 #define IPC_MESSAGE_START GpuMsgStart 32 #define IPC_MESSAGE_START GpuMsgStart
40 33
41 IPC_STRUCT_TRAITS_BEGIN(gpu::GPUMemoryUmaStats) 34 IPC_STRUCT_TRAITS_BEGIN(gpu::GPUMemoryUmaStats)
42 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_current) 35 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_current)
43 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_max) 36 IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_max)
44 IPC_STRUCT_TRAITS_END() 37 IPC_STRUCT_TRAITS_END()
45 38
(...skipping 26 matching lines...) Expand all
72 IPC_STRUCT_END() 65 IPC_STRUCT_END()
73 66
74 IPC_STRUCT_TRAITS_BEGIN(content::EstablishChannelParams) 67 IPC_STRUCT_TRAITS_BEGIN(content::EstablishChannelParams)
75 IPC_STRUCT_TRAITS_MEMBER(client_id) 68 IPC_STRUCT_TRAITS_MEMBER(client_id)
76 IPC_STRUCT_TRAITS_MEMBER(client_tracing_id) 69 IPC_STRUCT_TRAITS_MEMBER(client_tracing_id)
77 IPC_STRUCT_TRAITS_MEMBER(preempts) 70 IPC_STRUCT_TRAITS_MEMBER(preempts)
78 IPC_STRUCT_TRAITS_MEMBER(allow_view_command_buffers) 71 IPC_STRUCT_TRAITS_MEMBER(allow_view_command_buffers)
79 IPC_STRUCT_TRAITS_MEMBER(allow_real_time_streams) 72 IPC_STRUCT_TRAITS_MEMBER(allow_real_time_streams)
80 IPC_STRUCT_TRAITS_END() 73 IPC_STRUCT_TRAITS_END()
81 74
82 #if defined(OS_MACOSX)
83 IPC_STRUCT_TRAITS_BEGIN(content::AcceleratedSurfaceBuffersSwappedParams)
84 IPC_STRUCT_TRAITS_MEMBER(surface_handle)
85 // Only one of ca_context_id or io_surface may be non-0.
86 IPC_STRUCT_TRAITS_MEMBER(ca_context_id)
87 IPC_STRUCT_TRAITS_MEMBER(fullscreen_low_power_ca_context_valid)
88 IPC_STRUCT_TRAITS_MEMBER(fullscreen_low_power_ca_context_id)
89 IPC_STRUCT_TRAITS_MEMBER(io_surface)
90 IPC_STRUCT_TRAITS_MEMBER(size)
91 IPC_STRUCT_TRAITS_MEMBER(scale_factor)
92 IPC_STRUCT_TRAITS_MEMBER(latency_info)
93 IPC_STRUCT_TRAITS_END()
94
95 IPC_STRUCT_TRAITS_BEGIN(content::BufferPresentedParams)
96 // The vsync parameters, to synchronize presentation with the display.
97 IPC_STRUCT_TRAITS_MEMBER(surface_handle)
98 IPC_STRUCT_TRAITS_MEMBER(vsync_timebase)
99 IPC_STRUCT_TRAITS_MEMBER(vsync_interval)
100 IPC_STRUCT_TRAITS_END()
101 #endif
102
103 IPC_STRUCT_TRAITS_BEGIN(gpu::GpuPreferences) 75 IPC_STRUCT_TRAITS_BEGIN(gpu::GpuPreferences)
104 IPC_STRUCT_TRAITS_MEMBER(single_process) 76 IPC_STRUCT_TRAITS_MEMBER(single_process)
105 IPC_STRUCT_TRAITS_MEMBER(in_process_gpu) 77 IPC_STRUCT_TRAITS_MEMBER(in_process_gpu)
106 IPC_STRUCT_TRAITS_MEMBER(ui_prioritize_in_gpu_process) 78 IPC_STRUCT_TRAITS_MEMBER(ui_prioritize_in_gpu_process)
107 IPC_STRUCT_TRAITS_MEMBER(disable_accelerated_video_decode) 79 IPC_STRUCT_TRAITS_MEMBER(disable_accelerated_video_decode)
108 #if defined(OS_CHROMEOS) 80 #if defined(OS_CHROMEOS)
109 IPC_STRUCT_TRAITS_MEMBER(disable_vaapi_accelerated_video_encode) 81 IPC_STRUCT_TRAITS_MEMBER(disable_vaapi_accelerated_video_encode)
110 #endif 82 #endif
111 #if defined(ENABLE_WEBRTC) 83 #if defined(ENABLE_WEBRTC)
112 IPC_STRUCT_TRAITS_MEMBER(disable_web_rtc_hw_encoding) 84 IPC_STRUCT_TRAITS_MEMBER(disable_web_rtc_hw_encoding)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 int32_t, /* client_id */ 152 int32_t, /* client_id */
181 gpu::SyncToken /* sync_token */) 153 gpu::SyncToken /* sync_token */)
182 154
183 // Tells the GPU process to create a context for collecting graphics card 155 // Tells the GPU process to create a context for collecting graphics card
184 // information. 156 // information.
185 IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo) 157 IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo)
186 158
187 // Tells the GPU process to report video_memory information for the task manager 159 // Tells the GPU process to report video_memory information for the task manager
188 IPC_MESSAGE_CONTROL0(GpuMsg_GetVideoMemoryUsageStats) 160 IPC_MESSAGE_CONTROL0(GpuMsg_GetVideoMemoryUsageStats)
189 161
190 #if defined(OS_MACOSX)
191 // Tells the GPU process that the browser process has handled the swap
192 // buffers or post sub-buffer request.
193 IPC_MESSAGE_CONTROL1(AcceleratedSurfaceMsg_BufferPresented,
194 content::BufferPresentedParams)
195 #endif
196
197 #if defined(OS_ANDROID) 162 #if defined(OS_ANDROID)
198 // Tells the GPU process to wake up the GPU because we're about to draw. 163 // Tells the GPU process to wake up the GPU because we're about to draw.
199 IPC_MESSAGE_CONTROL0(GpuMsg_WakeUpGpu) 164 IPC_MESSAGE_CONTROL0(GpuMsg_WakeUpGpu)
200 165
201 // Tells the GPU process to release the surface because it's being destroyed. 166 // Tells the GPU process to release the surface because it's being destroyed.
202 IPC_MESSAGE_CONTROL1(GpuMsg_DestroyingVideoSurface, int /* surface_id */) 167 IPC_MESSAGE_CONTROL1(GpuMsg_DestroyingVideoSurface, int /* surface_id */)
203 #endif 168 #endif
204 169
205 // Tells the GPU process to remove all contexts. 170 // Tells the GPU process to remove all contexts.
206 IPC_MESSAGE_CONTROL0(GpuMsg_Clean) 171 IPC_MESSAGE_CONTROL0(GpuMsg_Clean)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 gfx::GpuMemoryBufferHandle /* handle */) 212 gfx::GpuMemoryBufferHandle /* handle */)
248 213
249 // Response from GPU to a GpuMsg_CollectGraphicsInfo. 214 // Response from GPU to a GpuMsg_CollectGraphicsInfo.
250 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, 215 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected,
251 gpu::GPUInfo /* GPU logging stats */) 216 gpu::GPUInfo /* GPU logging stats */)
252 217
253 // Response from GPU to a GpuMsg_GetVideoMemory. 218 // Response from GPU to a GpuMsg_GetVideoMemory.
254 IPC_MESSAGE_CONTROL1(GpuHostMsg_VideoMemoryUsageStats, 219 IPC_MESSAGE_CONTROL1(GpuHostMsg_VideoMemoryUsageStats,
255 gpu::VideoMemoryUsageStats /* GPU memory stats */) 220 gpu::VideoMemoryUsageStats /* GPU memory stats */)
256 221
257 #if defined(OS_MACOSX)
258 // Tells the browser that an accelerated surface has swapped.
259 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceBuffersSwapped,
260 content::AcceleratedSurfaceBuffersSwappedParams)
261 #endif
262
263 #if defined(OS_WIN) 222 #if defined(OS_WIN)
264 IPC_MESSAGE_CONTROL2(GpuHostMsg_AcceleratedSurfaceCreatedChildWindow, 223 IPC_MESSAGE_CONTROL2(GpuHostMsg_AcceleratedSurfaceCreatedChildWindow,
265 gpu::SurfaceHandle /* parent_window */, 224 gpu::SurfaceHandle /* parent_window */,
266 gpu::SurfaceHandle /* child_window */) 225 gpu::SurfaceHandle /* child_window */)
267 #endif 226 #endif
268 227
269 #if defined(OS_ANDROID) 228 #if defined(OS_ANDROID)
270 // Response to a GpuMsg_DestroyingVideoSurface message. 229 // Response to a GpuMsg_DestroyingVideoSurface message.
271 IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyingVideoSurfaceAck, 230 IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyingVideoSurfaceAck,
272 int /* surface_id */) 231 int /* surface_id */)
(...skipping 11 matching lines...) Expand all
284 243
285 // Tells the browser about GPU memory usage statistics for UMA logging. 244 // Tells the browser about GPU memory usage statistics for UMA logging.
286 IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryUmaStats, 245 IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryUmaStats,
287 gpu::GPUMemoryUmaStats /* GPU memory UMA stats */) 246 gpu::GPUMemoryUmaStats /* GPU memory UMA stats */)
288 247
289 // Message from GPU to add a GPU log message to the about:gpu page. 248 // Message from GPU to add a GPU log message to the about:gpu page.
290 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, 249 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage,
291 int /*severity*/, 250 int /*severity*/,
292 std::string /* header */, 251 std::string /* header */,
293 std::string /* message */) 252 std::string /* message */)
OLDNEW
« no previous file with comments | « content/common/buffer_presented_params_mac.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698