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

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

Issue 1753383003: Get rid of gpu related switches by passing gpu::GpuPreferences via IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 9 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
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/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" 15 #include "content/public/common/gpu_memory_stats.h"
16 #include "gpu/command_buffer/common/sync_token.h" 16 #include "gpu/command_buffer/common/sync_token.h"
17 #include "gpu/command_buffer/common/value_state.h" 17 #include "gpu/command_buffer/common/value_state.h"
18 #include "gpu/command_buffer/service/gpu_preferences.h"
18 #include "gpu/config/gpu_info.h" 19 #include "gpu/config/gpu_info.h"
19 #include "ipc/ipc_channel_handle.h" 20 #include "ipc/ipc_channel_handle.h"
20 #include "ipc/ipc_message_macros.h" 21 #include "ipc/ipc_message_macros.h"
21 #include "ipc/ipc_message_start.h" 22 #include "ipc/ipc_message_start.h"
22 #include "ui/gfx/gpu_memory_buffer.h" 23 #include "ui/gfx/gpu_memory_buffer.h"
23 #include "ui/gfx/ipc/gfx_param_traits.h" 24 #include "ui/gfx/ipc/gfx_param_traits.h"
24 #include "ui/gfx/native_widget_types.h" 25 #include "ui/gfx/native_widget_types.h"
25 #include "url/gurl.h" 26 #include "url/gurl.h"
26 27
27 #if defined(OS_MACOSX) 28 #if defined(OS_MACOSX)
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 IPC_STRUCT_TRAITS_END() 93 IPC_STRUCT_TRAITS_END()
93 94
94 IPC_STRUCT_TRAITS_BEGIN(content::BufferPresentedParams) 95 IPC_STRUCT_TRAITS_BEGIN(content::BufferPresentedParams)
95 // The vsync parameters, to synchronize presentation with the display. 96 // The vsync parameters, to synchronize presentation with the display.
96 IPC_STRUCT_TRAITS_MEMBER(surface_id) 97 IPC_STRUCT_TRAITS_MEMBER(surface_id)
97 IPC_STRUCT_TRAITS_MEMBER(vsync_timebase) 98 IPC_STRUCT_TRAITS_MEMBER(vsync_timebase)
98 IPC_STRUCT_TRAITS_MEMBER(vsync_interval) 99 IPC_STRUCT_TRAITS_MEMBER(vsync_interval)
99 IPC_STRUCT_TRAITS_END() 100 IPC_STRUCT_TRAITS_END()
100 #endif 101 #endif
101 102
103 IPC_STRUCT_TRAITS_BEGIN(gpu::GpuPreferences)
104 IPC_STRUCT_TRAITS_MEMBER(single_process)
105 IPC_STRUCT_TRAITS_MEMBER(in_process_gpu)
106 IPC_STRUCT_TRAITS_MEMBER(compile_shader_always_succeeds)
107 IPC_STRUCT_TRAITS_MEMBER(disable_gl_error_limit)
108 IPC_STRUCT_TRAITS_MEMBER(disable_glsl_translator)
109 IPC_STRUCT_TRAITS_MEMBER(disable_gpu_driver_bug_workarounds)
110 IPC_STRUCT_TRAITS_MEMBER(disable_shader_name_hashing)
111 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_command_logging)
112 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_debugging)
113 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_logging_gpu)
114 IPC_STRUCT_TRAITS_MEMBER(disable_gpu_program_cache)
115 IPC_STRUCT_TRAITS_MEMBER(enforce_gl_minimums)
116 IPC_STRUCT_TRAITS_MEMBER(force_gpu_mem_available)
117 IPC_STRUCT_TRAITS_MEMBER(gpu_program_cache_size)
118 IPC_STRUCT_TRAITS_MEMBER(disable_gpu_shader_disk_cache)
119 IPC_STRUCT_TRAITS_MEMBER(enable_share_group_async_texture_upload)
120 IPC_STRUCT_TRAITS_MEMBER(enable_subscribe_uniform_extension)
121 IPC_STRUCT_TRAITS_MEMBER(enable_threaded_texture_mailboxes)
122 IPC_STRUCT_TRAITS_MEMBER(gl_shader_interm_output)
123 IPC_STRUCT_TRAITS_MEMBER(emulate_shader_precision)
124 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_logging)
125 IPC_STRUCT_TRAITS_MEMBER(enable_gpu_service_tracing)
126 IPC_STRUCT_TRAITS_MEMBER(enable_unsafe_es3_apis)
127 IPC_STRUCT_TRAITS_END()
128
102 //------------------------------------------------------------------------------ 129 //------------------------------------------------------------------------------
103 // GPU Messages 130 // GPU Messages
104 // These are messages from the browser to the GPU process. 131 // These are messages from the browser to the GPU process.
105 132
106 // Tells the GPU process to initialize itself. The browser explicitly 133 // Tells the GPU process to initialize itself. The browser explicitly
107 // requests this be done so that we are guaranteed that the channel is set 134 // requests this be done so that we are guaranteed that the channel is set
108 // up between the browser and GPU process before doing any work that might 135 // up between the browser and GPU process before doing any work that might
109 // potentially crash the GPU process. Detection of the child process 136 // potentially crash the GPU process. Detection of the child process
110 // exiting abruptly is predicated on having the IPC channel set up. 137 // exiting abruptly is predicated on having the IPC channel set up.
111 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) 138 IPC_MESSAGE_CONTROL1(GpuMsg_Initialize,
139 gpu::GpuPreferences /* gpu_prefernces */)
112 140
113 // Tells the GPU process to shutdown itself. 141 // Tells the GPU process to shutdown itself.
114 IPC_MESSAGE_CONTROL0(GpuMsg_Finalize) 142 IPC_MESSAGE_CONTROL0(GpuMsg_Finalize)
115 143
116 // Tells the GPU process to create a new channel for communication with a 144 // Tells the GPU process to create a new channel for communication with a
117 // given client. The channel name is returned in a 145 // given client. The channel name is returned in a
118 // GpuHostMsg_ChannelEstablished message. The client ID is passed so 146 // GpuHostMsg_ChannelEstablished message. The client ID is passed so
119 // that the GPU process reuses an existing channel to that process if it exists. 147 // that the GPU process reuses an existing channel to that process if it exists.
120 // This ID is a unique opaque identifier generated by the browser process. 148 // This ID is a unique opaque identifier generated by the browser process.
121 // The client_tracing_id is a unique ID used for the purposes of tracing. 149 // The client_tracing_id is a unique ID used for the purposes of tracing.
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // so the browser should stop sending the corresponding information 294 // so the browser should stop sending the corresponding information
267 IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription, 295 IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription,
268 int32_t /* client_id */, 296 int32_t /* client_id */,
269 unsigned int /* target */) 297 unsigned int /* target */)
270 298
271 // Message from GPU to add a GPU log message to the about:gpu page. 299 // Message from GPU to add a GPU log message to the about:gpu page.
272 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, 300 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage,
273 int /*severity*/, 301 int /*severity*/,
274 std::string /* header */, 302 std::string /* header */,
275 std::string /* message */) 303 std::string /* message */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698