| Index: content/common/gpu/gpu_messages.h
|
| diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
|
| index 832ad001d47f5a40f301a22dcfd8148c63243a88..3616c0369885e9ac1eac969cc687841fa5780303 100644
|
| --- a/content/common/gpu/gpu_messages.h
|
| +++ b/content/common/gpu/gpu_messages.h
|
| @@ -14,10 +14,18 @@
|
| #include "build/build_config.h"
|
| #include "content/common/content_export.h"
|
| #include "content/common/content_param_traits.h"
|
| +#include "content/common/gpu/command_buffer_console_message.h"
|
| +#include "content/common/gpu/create_gpu_memory_buffer_from_handle_params.h"
|
| +#include "content/common/gpu/create_gpu_memory_buffer_params.h"
|
| +#include "content/common/gpu/create_image_params.h"
|
| +#include "content/common/gpu/gpu_create_command_buffer_config.h"
|
| #include "content/common/gpu/gpu_memory_uma_stats.h"
|
| #include "content/common/gpu/gpu_process_launch_causes.h"
|
| #include "content/common/gpu/gpu_result_codes.h"
|
| #include "content/common/gpu/gpu_stream_priority.h"
|
| +#include "content/common/gpu/jpeg_decode_params.h"
|
| +#include "content/common/gpu/video_decode_params.h"
|
| +#include "content/common/gpu/video_encode_params.h"
|
| #include "content/public/common/common_param_traits.h"
|
| #include "content/public/common/gpu_memory_stats.h"
|
| #include "gpu/command_buffer/common/capabilities.h"
|
| @@ -85,14 +93,14 @@ IPC_ENUM_TRAITS_MIN_MAX_VALUE(gpu::VideoCodecProfile,
|
| gpu::VIDEO_CODEC_PROFILE_MIN,
|
| gpu::VIDEO_CODEC_PROFILE_MAX)
|
|
|
| -IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig)
|
| - IPC_STRUCT_MEMBER(int32_t, share_group_id)
|
| - IPC_STRUCT_MEMBER(int32_t, stream_id)
|
| - IPC_STRUCT_MEMBER(content::GpuStreamPriority, stream_priority)
|
| - IPC_STRUCT_MEMBER(std::vector<int>, attribs)
|
| - IPC_STRUCT_MEMBER(GURL, active_url)
|
| - IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference)
|
| -IPC_STRUCT_END()
|
| +IPC_STRUCT_TRAITS_BEGIN(content::GpuCreateCommandBufferConfig)
|
| + IPC_STRUCT_TRAITS_MEMBER(share_group_id)
|
| + IPC_STRUCT_TRAITS_MEMBER(stream_id)
|
| + IPC_STRUCT_TRAITS_MEMBER(stream_priority)
|
| + IPC_STRUCT_TRAITS_MEMBER(attribs)
|
| + IPC_STRUCT_TRAITS_MEMBER(active_url)
|
| + IPC_STRUCT_TRAITS_MEMBER(gpu_preference)
|
| +IPC_STRUCT_TRAITS_END()
|
|
|
| IPC_STRUCT_BEGIN(GpuMsg_EstablishChannel_Params)
|
| IPC_STRUCT_MEMBER(int, client_id)
|
| @@ -102,22 +110,22 @@ IPC_STRUCT_BEGIN(GpuMsg_EstablishChannel_Params)
|
| IPC_STRUCT_MEMBER(bool, allow_real_time_streams)
|
| IPC_STRUCT_END()
|
|
|
| -IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBuffer_Params)
|
| - IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id)
|
| - IPC_STRUCT_MEMBER(gfx::Size, size)
|
| - IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
|
| - IPC_STRUCT_MEMBER(gfx::BufferUsage, usage)
|
| - IPC_STRUCT_MEMBER(int32_t, client_id)
|
| - IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, surface_handle)
|
| -IPC_STRUCT_END()
|
| +IPC_STRUCT_TRAITS_BEGIN(content::CreateGpuMemoryBufferParams)
|
| + IPC_STRUCT_TRAITS_MEMBER(id)
|
| + IPC_STRUCT_TRAITS_MEMBER(size)
|
| + IPC_STRUCT_TRAITS_MEMBER(format)
|
| + IPC_STRUCT_TRAITS_MEMBER(usage)
|
| + IPC_STRUCT_TRAITS_MEMBER(client_id)
|
| + IPC_STRUCT_TRAITS_MEMBER(surface_handle)
|
| +IPC_STRUCT_TRAITS_END()
|
|
|
| -IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBufferFromHandle_Params)
|
| - IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferHandle, handle)
|
| - IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id)
|
| - IPC_STRUCT_MEMBER(gfx::Size, size)
|
| - IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
|
| - IPC_STRUCT_MEMBER(int32_t, client_id)
|
| -IPC_STRUCT_END()
|
| +IPC_STRUCT_TRAITS_BEGIN(content::CreateGpuMemoryBufferFromHandleParams)
|
| + IPC_STRUCT_TRAITS_MEMBER(handle)
|
| + IPC_STRUCT_TRAITS_MEMBER(id)
|
| + IPC_STRUCT_TRAITS_MEMBER(size)
|
| + IPC_STRUCT_TRAITS_MEMBER(format)
|
| + IPC_STRUCT_TRAITS_MEMBER(client_id)
|
| +IPC_STRUCT_TRAITS_END()
|
|
|
| #if defined(OS_MACOSX)
|
| IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params)
|
| @@ -138,47 +146,46 @@ IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params)
|
| IPC_STRUCT_END()
|
| #endif
|
|
|
| -IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params)
|
| - IPC_STRUCT_MEMBER(int32_t, input_buffer_id)
|
| - IPC_STRUCT_MEMBER(gfx::Size, coded_size)
|
| - IPC_STRUCT_MEMBER(base::SharedMemoryHandle, input_buffer_handle)
|
| - IPC_STRUCT_MEMBER(uint32_t, input_buffer_size)
|
| - IPC_STRUCT_MEMBER(base::SharedMemoryHandle, output_video_frame_handle)
|
| - IPC_STRUCT_MEMBER(uint32_t, output_buffer_size)
|
| -IPC_STRUCT_END()
|
| +IPC_STRUCT_TRAITS_BEGIN(content::JpegDecodeParams)
|
| + IPC_STRUCT_TRAITS_MEMBER(input_buffer_id)
|
| + IPC_STRUCT_TRAITS_MEMBER(coded_size)
|
| + IPC_STRUCT_TRAITS_MEMBER(input_buffer_handle)
|
| + IPC_STRUCT_TRAITS_MEMBER(input_buffer_size)
|
| + IPC_STRUCT_TRAITS_MEMBER(output_video_frame_handle)
|
| + IPC_STRUCT_TRAITS_MEMBER(output_buffer_size)
|
| +IPC_STRUCT_TRAITS_END()
|
|
|
| -IPC_STRUCT_BEGIN(AcceleratedVideoDecoderMsg_Decode_Params)
|
| - IPC_STRUCT_MEMBER(int32_t, bitstream_buffer_id)
|
| - IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle)
|
| - IPC_STRUCT_MEMBER(uint32_t, size)
|
| - IPC_STRUCT_MEMBER(base::TimeDelta, presentation_timestamp)
|
| - IPC_STRUCT_MEMBER(std::string, key_id)
|
| - IPC_STRUCT_MEMBER(std::string, iv)
|
| - IPC_STRUCT_MEMBER(std::vector<media::SubsampleEntry>, subsamples)
|
| -IPC_STRUCT_END()
|
| +IPC_STRUCT_TRAITS_BEGIN(content::VideoDecodeParams)
|
| + IPC_STRUCT_TRAITS_MEMBER(bitstream_buffer_id)
|
| + IPC_STRUCT_TRAITS_MEMBER(buffer_handle)
|
| + IPC_STRUCT_TRAITS_MEMBER(size)
|
| + IPC_STRUCT_TRAITS_MEMBER(presentation_timestamp)
|
| + IPC_STRUCT_TRAITS_MEMBER(key_id)
|
| + IPC_STRUCT_TRAITS_MEMBER(iv)
|
| + IPC_STRUCT_TRAITS_MEMBER(subsamples)
|
| +IPC_STRUCT_TRAITS_END()
|
|
|
| -IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params)
|
| - IPC_STRUCT_MEMBER(int32_t, frame_id)
|
| - IPC_STRUCT_MEMBER(base::TimeDelta, timestamp)
|
| - IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle)
|
| - IPC_STRUCT_MEMBER(uint32_t, buffer_offset)
|
| - IPC_STRUCT_MEMBER(uint32_t, buffer_size)
|
| - IPC_STRUCT_MEMBER(bool, force_keyframe)
|
| -IPC_STRUCT_END()
|
| +IPC_STRUCT_TRAITS_BEGIN(content::VideoEncodeParams)
|
| + IPC_STRUCT_TRAITS_MEMBER(frame_id)
|
| + IPC_STRUCT_TRAITS_MEMBER(timestamp)
|
| + IPC_STRUCT_TRAITS_MEMBER(buffer_handle)
|
| + IPC_STRUCT_TRAITS_MEMBER(buffer_offset)
|
| + IPC_STRUCT_TRAITS_MEMBER(buffer_size)
|
| + IPC_STRUCT_TRAITS_MEMBER(force_keyframe)
|
| +IPC_STRUCT_TRAITS_END()
|
|
|
| -IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params2)
|
| - IPC_STRUCT_MEMBER(int32_t, frame_id)
|
| - IPC_STRUCT_MEMBER(base::TimeDelta, timestamp)
|
| - IPC_STRUCT_MEMBER(std::vector<gfx::GpuMemoryBufferHandle>,
|
| - gpu_memory_buffer_handles)
|
| - IPC_STRUCT_MEMBER(gfx::Size, size)
|
| - IPC_STRUCT_MEMBER(bool, force_keyframe)
|
| -IPC_STRUCT_END()
|
| +IPC_STRUCT_TRAITS_BEGIN(content::VideoEncodeParams2)
|
| + IPC_STRUCT_TRAITS_MEMBER(frame_id)
|
| + IPC_STRUCT_TRAITS_MEMBER(timestamp)
|
| + IPC_STRUCT_TRAITS_MEMBER(gpu_memory_buffer_handles)
|
| + IPC_STRUCT_TRAITS_MEMBER(size)
|
| + IPC_STRUCT_TRAITS_MEMBER(force_keyframe)
|
| +IPC_STRUCT_TRAITS_END()
|
|
|
| -IPC_STRUCT_BEGIN(GPUCommandBufferConsoleMessage)
|
| - IPC_STRUCT_MEMBER(int32_t, id)
|
| - IPC_STRUCT_MEMBER(std::string, message)
|
| -IPC_STRUCT_END()
|
| +IPC_STRUCT_TRAITS_BEGIN(content::CommandBufferConsoleMessage)
|
| + IPC_STRUCT_TRAITS_MEMBER(id)
|
| + IPC_STRUCT_TRAITS_MEMBER(message)
|
| +IPC_STRUCT_TRAITS_END()
|
|
|
| #if defined(OS_ANDROID)
|
| IPC_STRUCT_BEGIN(GpuStreamTextureMsg_MatrixChanged_Params)
|
| @@ -201,14 +208,14 @@ IPC_STRUCT_BEGIN(GpuStreamTextureMsg_MatrixChanged_Params)
|
| IPC_STRUCT_END()
|
| #endif
|
|
|
| -IPC_STRUCT_BEGIN(GpuCommandBufferMsg_CreateImage_Params)
|
| - IPC_STRUCT_MEMBER(int32_t, id)
|
| - IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferHandle, gpu_memory_buffer)
|
| - IPC_STRUCT_MEMBER(gfx::Size, size)
|
| - IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
|
| - IPC_STRUCT_MEMBER(uint32_t, internal_format)
|
| - IPC_STRUCT_MEMBER(uint64_t, image_release_count)
|
| -IPC_STRUCT_END()
|
| +IPC_STRUCT_TRAITS_BEGIN(content::CreateImageParams)
|
| + IPC_STRUCT_TRAITS_MEMBER(id)
|
| + IPC_STRUCT_TRAITS_MEMBER(gpu_memory_buffer)
|
| + IPC_STRUCT_TRAITS_MEMBER(size)
|
| + IPC_STRUCT_TRAITS_MEMBER(format)
|
| + IPC_STRUCT_TRAITS_MEMBER(internal_format)
|
| + IPC_STRUCT_TRAITS_MEMBER(image_release_count)
|
| +IPC_STRUCT_TRAITS_END()
|
|
|
| IPC_STRUCT_TRAITS_BEGIN(gpu::DxDiagNode)
|
| IPC_STRUCT_TRAITS_MEMBER(values)
|
| @@ -349,19 +356,19 @@ IPC_MESSAGE_CONTROL1(GpuMsg_CloseChannel,
|
| // Tells the GPU process to create a new command buffer that renders directly
|
| // to a native view. A corresponding GpuCommandBufferStub is created.
|
| IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer,
|
| - gfx::GLSurfaceHandle, /* compositing_surface */
|
| - int32_t, /* client_id */
|
| - GPUCreateCommandBufferConfig, /* init_params */
|
| + gfx::GLSurfaceHandle, /* compositing_surface */
|
| + int32_t, /* client_id */
|
| + content::GpuCreateCommandBufferConfig, /* init_params */
|
| int32_t /* route_id */)
|
|
|
| // Tells the GPU process to create a new gpu memory buffer.
|
| IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBuffer,
|
| - GpuMsg_CreateGpuMemoryBuffer_Params)
|
| + content::CreateGpuMemoryBufferParams)
|
|
|
| // Tells the GPU process to create a new gpu memory buffer from an existing
|
| // handle.
|
| IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBufferFromHandle,
|
| - GpuMsg_CreateGpuMemoryBufferFromHandle_Params)
|
| + content::CreateGpuMemoryBufferFromHandleParams)
|
|
|
| // Tells the GPU process to destroy buffer.
|
| IPC_MESSAGE_CONTROL3(GpuMsg_DestroyGpuMemoryBuffer,
|
| @@ -519,11 +526,12 @@ IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription,
|
|
|
| // Tells the GPU process to create a new command buffer that renders to an
|
| // offscreen frame buffer.
|
| -IPC_SYNC_MESSAGE_CONTROL3_1(GpuChannelMsg_CreateOffscreenCommandBuffer,
|
| - gfx::Size, /* size */
|
| - GPUCreateCommandBufferConfig, /* init_params */
|
| - int32_t, /* route_id */
|
| - bool /* succeeded */)
|
| +IPC_SYNC_MESSAGE_CONTROL3_1(
|
| + GpuChannelMsg_CreateOffscreenCommandBuffer,
|
| + gfx::Size, /* size */
|
| + content::GpuCreateCommandBufferConfig, /* init_params */
|
| + int32_t, /* route_id */
|
| + bool /* succeeded */)
|
|
|
| // The CommandBufferProxy sends this to the GpuCommandBufferStub in its
|
| // destructor, so that the stub deletes the actual CommandBufferService
|
| @@ -605,7 +613,7 @@ IPC_MESSAGE_ROUTED3(GpuCommandBufferMsg_AsyncFlush,
|
|
|
| // Sent by the GPU process to display messages in the console.
|
| IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ConsoleMsg,
|
| - GPUCommandBufferConsoleMessage /* msg */)
|
| + content::CommandBufferConsoleMessage /* msg */)
|
|
|
| // Register an existing shared memory transfer buffer. The id that can be
|
| // used to identify the transfer buffer from a command buffer.
|
| @@ -669,7 +677,7 @@ IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SignalAck, uint32_t /* signal_id */)
|
| // Create an image from an existing gpu memory buffer. The id that can be
|
| // used to identify the image from a command buffer.
|
| IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_CreateImage,
|
| - GpuCommandBufferMsg_CreateImage_Params /* params */)
|
| + content::CreateImageParams /* params */)
|
|
|
| // Destroy a previously created image.
|
| IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyImage, int32_t /* id */)
|
| @@ -690,7 +698,7 @@ IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_SetCdm,
|
|
|
| // Send input buffer for decoding.
|
| IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode,
|
| - AcceleratedVideoDecoderMsg_Decode_Params)
|
| + content::VideoDecodeParams)
|
|
|
| // Give the texture IDs for the textures the decoder will use for output.
|
| IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffers,
|
| @@ -760,13 +768,13 @@ IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
|
| // Queue a video frame to the encoder to encode. |frame_id| will be returned
|
| // by AcceleratedVideoEncoderHostMsg_NotifyInputDone.
|
| IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderMsg_Encode,
|
| - AcceleratedVideoEncoderMsg_Encode_Params)
|
| + content::VideoEncodeParams)
|
|
|
| // Queue a GpuMemoryBuffer backed video frame to the encoder to encode.
|
| // |frame_id| will be returned by
|
| // AcceleratedVideoEncoderHostMsg_NotifyInputDone.
|
| IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderMsg_Encode2,
|
| - AcceleratedVideoEncoderMsg_Encode_Params2)
|
| + content::VideoEncodeParams2)
|
|
|
| // Queue a buffer to the encoder for use in returning output. |buffer_id| will
|
| // be returned by AcceleratedVideoEncoderHostMsg_BitstreamBufferReady.
|
| @@ -819,8 +827,7 @@ IPC_MESSAGE_ROUTED0(AcceleratedVideoEncoderMsg_Destroy)
|
| // and the size of JPEG image is |coded_size|. Decoded I420 frame data will
|
| // be put onto shared memory associated with |output_video_frame_handle|
|
| // with size limit |output_buffer_size|.
|
| -IPC_MESSAGE_ROUTED1(AcceleratedJpegDecoderMsg_Decode,
|
| - AcceleratedJpegDecoderMsg_Decode_Params)
|
| +IPC_MESSAGE_ROUTED1(AcceleratedJpegDecoderMsg_Decode, content::JpegDecodeParams)
|
|
|
| // Send destroy request to the decoder.
|
| IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy)
|
|
|