Chromium Code Reviews| Index: content/common/gpu/gpu_messages.h |
| diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h |
| index a05e6c49ed08a217e560a5800a3bd46c817ffdbf..177e63c23a9d257929d9c0763d0e688983c26954 100644 |
| --- a/content/common/gpu/gpu_messages.h |
| +++ b/content/common/gpu/gpu_messages.h |
| @@ -55,6 +55,23 @@ |
| #define IPC_MESSAGE_START GpuMsgStart |
| +#ifndef CONTENT_COMMON_GPU_GPU_MESSAGES_H_ |
|
dcheng
2016/02/18 21:06:09
Often times, people just add this to a new file (s
Owen Lin
2016/02/23 03:40:11
Acknowledged.
|
| +#define CONTENT_COMMON_GPU_GPU_MESSAGES_H_ |
| + |
| +namespace IPC { |
| +template <> |
| +struct ParamTraits<media::BitstreamBuffer> { |
| + using param_type = media::BitstreamBuffer; |
| + static void Write(base::Pickle* m, const param_type& p); |
| + static bool Read(const base::Pickle* m, |
| + base::PickleIterator* iter, |
| + param_type* r); |
| + static void Log(const param_type& p, std::string* l); |
| +}; |
| + |
| +} // namespace IPC |
| + |
| +#endif // CONTENT_COMMON_GPU_GPU_MESSAGES_H_ |
| IPC_ENUM_TRAITS_MAX_VALUE(content::CauseForGpuLaunch, |
| content::CAUSE_FOR_GPU_LAUNCH_MAX_ENUM - 1) |
| IPC_ENUM_TRAITS_MAX_VALUE(gfx::GpuPreference, |
| @@ -136,24 +153,12 @@ IPC_STRUCT_END() |
| #endif |
| IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params) |
| - IPC_STRUCT_MEMBER(int32_t, input_buffer_id) |
| + IPC_STRUCT_MEMBER(media::BitstreamBuffer, input_buffer) |
| 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_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_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params) |
| IPC_STRUCT_MEMBER(int32_t, frame_id) |
| IPC_STRUCT_MEMBER(base::TimeDelta, timestamp) |
| @@ -686,8 +691,7 @@ IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_SetCdm, |
| int32_t) /* CDM ID */ |
| // Send input buffer for decoding. |
| -IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode, |
| - AcceleratedVideoDecoderMsg_Decode_Params) |
| +IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode, media::BitstreamBuffer) |
| // Give the texture IDs for the textures the decoder will use for output. |
| IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffers, |