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

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

Issue 1365563002: Make channel preemption not require view contexts for hookup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wakeup_gpu
Patch Set: rebase Created 5 years, 3 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 (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
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) 81 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig)
82 IPC_STRUCT_MEMBER(int32, share_group_id) 82 IPC_STRUCT_MEMBER(int32, share_group_id)
83 IPC_STRUCT_MEMBER(int32, stream_id) 83 IPC_STRUCT_MEMBER(int32, stream_id)
84 IPC_STRUCT_MEMBER(content::GpuStreamPriority, stream_priority) 84 IPC_STRUCT_MEMBER(content::GpuStreamPriority, stream_priority)
85 IPC_STRUCT_MEMBER(std::vector<int>, attribs) 85 IPC_STRUCT_MEMBER(std::vector<int>, attribs)
86 IPC_STRUCT_MEMBER(GURL, active_url) 86 IPC_STRUCT_MEMBER(GURL, active_url)
87 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference) 87 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference)
88 IPC_STRUCT_END() 88 IPC_STRUCT_END()
89 89
90 IPC_STRUCT_BEGIN(GpuMsg_EstablishChannel_Params)
91 IPC_STRUCT_MEMBER(int, client_id)
92 IPC_STRUCT_MEMBER(uint64, client_tracing_id)
93 IPC_STRUCT_MEMBER(bool, preempts)
94 IPC_STRUCT_MEMBER(bool, preempted)
95 IPC_STRUCT_MEMBER(bool, allow_future_sync_points)
96 IPC_STRUCT_MEMBER(bool, allow_real_time_streams)
97 IPC_STRUCT_END()
98
90 IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBuffer_Params) 99 IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBuffer_Params)
91 IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id) 100 IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id)
92 IPC_STRUCT_MEMBER(gfx::Size, size) 101 IPC_STRUCT_MEMBER(gfx::Size, size)
93 IPC_STRUCT_MEMBER(gfx::BufferFormat, format) 102 IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
94 IPC_STRUCT_MEMBER(gfx::BufferUsage, usage) 103 IPC_STRUCT_MEMBER(gfx::BufferUsage, usage)
95 IPC_STRUCT_MEMBER(int32, client_id) 104 IPC_STRUCT_MEMBER(int32, client_id)
96 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, surface_handle) 105 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, surface_handle)
97 IPC_STRUCT_END() 106 IPC_STRUCT_END()
98 107
99 #if defined(OS_MACOSX) 108 #if defined(OS_MACOSX)
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 IPC_STRUCT_TRAITS_END() 258 IPC_STRUCT_TRAITS_END()
250 259
251 IPC_STRUCT_TRAITS_BEGIN(gpu::MemoryAllocation) 260 IPC_STRUCT_TRAITS_BEGIN(gpu::MemoryAllocation)
252 IPC_STRUCT_TRAITS_MEMBER(bytes_limit_when_visible) 261 IPC_STRUCT_TRAITS_MEMBER(bytes_limit_when_visible)
253 IPC_STRUCT_TRAITS_MEMBER(priority_cutoff_when_visible) 262 IPC_STRUCT_TRAITS_MEMBER(priority_cutoff_when_visible)
254 IPC_STRUCT_TRAITS_END() 263 IPC_STRUCT_TRAITS_END()
255 264
256 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle) 265 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle)
257 IPC_STRUCT_TRAITS_MEMBER(handle) 266 IPC_STRUCT_TRAITS_MEMBER(handle)
258 IPC_STRUCT_TRAITS_MEMBER(transport_type) 267 IPC_STRUCT_TRAITS_MEMBER(transport_type)
259 IPC_STRUCT_TRAITS_MEMBER(parent_client_id)
260 IPC_STRUCT_TRAITS_END() 268 IPC_STRUCT_TRAITS_END()
261 269
262 //------------------------------------------------------------------------------ 270 //------------------------------------------------------------------------------
263 // GPU Messages 271 // GPU Messages
264 // These are messages from the browser to the GPU process. 272 // These are messages from the browser to the GPU process.
265 273
266 // Tells the GPU process to initialize itself. The browser explicitly 274 // Tells the GPU process to initialize itself. The browser explicitly
267 // requests this be done so that we are guaranteed that the channel is set 275 // requests this be done so that we are guaranteed that the channel is set
268 // up between the browser and GPU process before doing any work that might 276 // up between the browser and GPU process before doing any work that might
269 // potentially crash the GPU process. Detection of the child process 277 // potentially crash the GPU process. Detection of the child process
270 // exiting abruptly is predicated on having the IPC channel set up. 278 // exiting abruptly is predicated on having the IPC channel set up.
271 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) 279 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize)
272 280
273 // Tells the GPU process to shutdown itself. 281 // Tells the GPU process to shutdown itself.
274 IPC_MESSAGE_CONTROL0(GpuMsg_Finalize) 282 IPC_MESSAGE_CONTROL0(GpuMsg_Finalize)
275 283
276 // Tells the GPU process to create a new channel for communication with a 284 // Tells the GPU process to create a new channel for communication with a
277 // given client. The channel name is returned in a 285 // given client. The channel name is returned in a
278 // GpuHostMsg_ChannelEstablished message. The client ID is passed so that 286 // GpuHostMsg_ChannelEstablished message. The client ID is passed so that
279 // the GPU process reuses an existing channel to that process if it exists. 287 // the GPU process reuses an existing channel to that process if it exists.
280 // This ID is a unique opaque identifier generated by the browser process. 288 // This ID is a unique opaque identifier generated by the browser process.
281 // The client_tracing_id is a unique ID used for the purposes of tracing. 289 // The client_tracing_id is a unique ID used for the purposes of tracing.
282 IPC_MESSAGE_CONTROL5(GpuMsg_EstablishChannel, 290 IPC_MESSAGE_CONTROL1(GpuMsg_EstablishChannel,
283 int /* client_id */, 291 GpuMsg_EstablishChannel_Params /* params */)
284 uint64 /* client_tracing_id */,
285 bool /* share_context */,
286 bool /* allow_future_sync_points */,
287 bool /* allow_real_time_streams */)
288 292
289 // Tells the GPU process to close the channel identified by IPC channel 293 // Tells the GPU process to close the channel identified by IPC channel
290 // handle. If no channel can be identified, do nothing. 294 // handle. If no channel can be identified, do nothing.
291 IPC_MESSAGE_CONTROL1(GpuMsg_CloseChannel, 295 IPC_MESSAGE_CONTROL1(GpuMsg_CloseChannel,
292 IPC::ChannelHandle /* channel_handle */) 296 IPC::ChannelHandle /* channel_handle */)
293 297
294 // Tells the GPU process to create a new command buffer that renders directly 298 // Tells the GPU process to create a new command buffer that renders directly
295 // to a native view. A corresponding GpuCommandBufferStub is created. 299 // to a native view. A corresponding GpuCommandBufferStub is created.
296 IPC_MESSAGE_CONTROL5(GpuMsg_CreateViewCommandBuffer, 300 IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer,
297 gfx::GLSurfaceHandle, /* compositing_surface */ 301 gfx::GLSurfaceHandle, /* compositing_surface */
298 int32, /* surface_id */ 302 int32, /* client_id */
299 int32, /* client_id */
300 GPUCreateCommandBufferConfig, /* init_params */ 303 GPUCreateCommandBufferConfig, /* init_params */
301 int32 /* route_id */) 304 int32 /* route_id */)
302 305
303 // Tells the GPU process to create a new gpu memory buffer. 306 // Tells the GPU process to create a new gpu memory buffer.
304 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBuffer, 307 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBuffer,
305 GpuMsg_CreateGpuMemoryBuffer_Params) 308 GpuMsg_CreateGpuMemoryBuffer_Params)
306 309
307 // Tells the GPU process to destroy buffer. 310 // Tells the GPU process to destroy buffer.
308 IPC_MESSAGE_CONTROL3(GpuMsg_DestroyGpuMemoryBuffer, 311 IPC_MESSAGE_CONTROL3(GpuMsg_DestroyGpuMemoryBuffer,
309 gfx::GpuMemoryBufferId, /* id */ 312 gfx::GpuMemoryBufferId, /* id */
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // process. The browser will create the GPU process if necessary, and will 368 // process. The browser will create the GPU process if necessary, and will
366 // return a handle to the channel via a GpuChannelEstablished message. 369 // return a handle to the channel via a GpuChannelEstablished message.
367 IPC_SYNC_MESSAGE_CONTROL1_3(GpuHostMsg_EstablishGpuChannel, 370 IPC_SYNC_MESSAGE_CONTROL1_3(GpuHostMsg_EstablishGpuChannel,
368 content::CauseForGpuLaunch, 371 content::CauseForGpuLaunch,
369 int /* client id */, 372 int /* client id */,
370 IPC::ChannelHandle /* handle to channel */, 373 IPC::ChannelHandle /* handle to channel */,
371 gpu::GPUInfo /* stats about GPU process*/) 374 gpu::GPUInfo /* stats about GPU process*/)
372 375
373 // A renderer sends this to the browser process when it wants to 376 // A renderer sends this to the browser process when it wants to
374 // create a GL context associated with the given view_id. 377 // create a GL context associated with the given view_id.
375 IPC_SYNC_MESSAGE_CONTROL3_1(GpuHostMsg_CreateViewCommandBuffer, 378 IPC_SYNC_MESSAGE_CONTROL2_1(GpuHostMsg_CreateViewCommandBuffer,
376 int32, /* surface_id */
377 GPUCreateCommandBufferConfig, /* init_params */ 379 GPUCreateCommandBufferConfig, /* init_params */
378 int32, /* route_id */ 380 int32, /* route_id */
379 content::CreateCommandBufferResult /* result */) 381 content::CreateCommandBufferResult /* result */)
380 382
381 // Response from GPU to a GputMsg_Initialize message. 383 // Response from GPU to a GputMsg_Initialize message.
382 IPC_MESSAGE_CONTROL2(GpuHostMsg_Initialized, 384 IPC_MESSAGE_CONTROL2(GpuHostMsg_Initialized,
383 bool /* result */, 385 bool /* result */,
384 ::gpu::GPUInfo /* gpu_info */) 386 ::gpu::GPUInfo /* gpu_info */)
385 387
386 // Response from GPU to a GpuHostMsg_EstablishChannel message. 388 // Response from GPU to a GpuHostMsg_EstablishChannel message.
387 IPC_MESSAGE_CONTROL1(GpuHostMsg_ChannelEstablished, 389 IPC_MESSAGE_CONTROL1(GpuHostMsg_ChannelEstablished,
388 IPC::ChannelHandle /* channel_handle */) 390 IPC::ChannelHandle /* channel_handle */)
389 391
390 // Message from GPU to notify to destroy the channel. 392 // Message from GPU to notify to destroy the channel.
391 IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyChannel, 393 IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyChannel,
392 int32 /* client_id */) 394 int32 /* client_id */)
393 395
394 // Message to cache the given shader information. 396 // Message to cache the given shader information.
395 IPC_MESSAGE_CONTROL3(GpuHostMsg_CacheShader, 397 IPC_MESSAGE_CONTROL3(GpuHostMsg_CacheShader,
396 int32 /* client_id */, 398 int32 /* client_id */,
397 std::string /* key */, 399 std::string /* key */,
398 std::string /* shader */) 400 std::string /* shader */)
399 401
400 // Message to the GPU that a shader was loaded from disk. 402 // Message to the GPU that a shader was loaded from disk.
401 IPC_MESSAGE_CONTROL1(GpuMsg_LoadedShader, 403 IPC_MESSAGE_CONTROL1(GpuMsg_LoadedShader,
402 std::string /* encoded shader */) 404 std::string /* encoded shader */)
403 405
404 // Respond from GPU to a GpuMsg_CreateViewCommandBuffer message. 406 // Respond from GPU to a GpuMsg_CreateViewCommandBuffer message.
405 IPC_MESSAGE_CONTROL1(GpuHostMsg_CommandBufferCreated, 407 IPC_MESSAGE_CONTROL1(GpuHostMsg_CommandBufferCreated,
406 content::CreateCommandBufferResult /* result */) 408 content::CreateCommandBufferResult /* result */)
407 409
408 // Request from GPU to free the browser resources associated with the
409 // command buffer.
410 IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyCommandBuffer,
411 int32 /* surface_id */)
412
413 // Response from GPU to a GpuMsg_CreateGpuMemoryBuffer message. 410 // Response from GPU to a GpuMsg_CreateGpuMemoryBuffer message.
414 IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryBufferCreated, 411 IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryBufferCreated,
415 gfx::GpuMemoryBufferHandle /* handle */) 412 gfx::GpuMemoryBufferHandle /* handle */)
416 413
417 // Response from GPU to a GpuMsg_CollectGraphicsInfo. 414 // Response from GPU to a GpuMsg_CollectGraphicsInfo.
418 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, 415 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected,
419 gpu::GPUInfo /* GPU logging stats */) 416 gpu::GPUInfo /* GPU logging stats */)
420 417
421 // Response from GPU to a GpuMsg_GetVideoMemory. 418 // Response from GPU to a GpuMsg_GetVideoMemory.
422 IPC_MESSAGE_CONTROL1(GpuHostMsg_VideoMemoryUsageStats, 419 IPC_MESSAGE_CONTROL1(GpuHostMsg_VideoMemoryUsageStats,
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) 793 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy)
797 794
798 //------------------------------------------------------------------------------ 795 //------------------------------------------------------------------------------
799 // Accelerated JPEG Decoder Host Messages 796 // Accelerated JPEG Decoder Host Messages
800 // These messages are sent from the GPU process to Browser process. 797 // These messages are sent from the GPU process to Browser process.
801 // 798 //
802 // Report decode status. 799 // Report decode status.
803 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, 800 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck,
804 int32, /* bitstream_buffer_id */ 801 int32, /* bitstream_buffer_id */
805 media::JpegDecodeAccelerator::Error /* error */) 802 media::JpegDecodeAccelerator::Error /* error */)
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/common/gpu/image_transport_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698