| Index: content/common/gpu/gpu_messages.h
|
| diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
|
| index 6bdec50cb74e9332ee46d1973d372ffab4668364..1e933590e67ffd32b64a8541b896289bf840ce3b 100644
|
| --- a/content/common/gpu/gpu_messages.h
|
| +++ b/content/common/gpu/gpu_messages.h
|
| @@ -27,6 +27,7 @@
|
| #include "ipc/ipc_channel_handle.h"
|
| #include "ipc/ipc_message_macros.h"
|
| #include "media/base/video_frame.h"
|
| +#include "media/video/jpeg_decode_accelerator.h"
|
| #include "media/video/video_decode_accelerator.h"
|
| #include "media/video/video_encode_accelerator.h"
|
| #include "ui/events/latency_info.h"
|
| @@ -57,6 +58,8 @@ IPC_ENUM_TRAITS_MAX_VALUE(gpu::MemoryAllocation::PriorityCutoff,
|
| IPC_ENUM_TRAITS_MAX_VALUE(gpu::error::Error, gpu::error::kErrorLast)
|
| IPC_ENUM_TRAITS_MAX_VALUE(gpu::error::ContextLostReason,
|
| gpu::error::kContextLostReasonLast)
|
| +IPC_ENUM_TRAITS_MAX_VALUE(media::JpegDecodeAccelerator::Error,
|
| + media::JpegDecodeAccelerator::LARGEST_ERROR_ENUM)
|
| IPC_ENUM_TRAITS_MAX_VALUE(media::VideoEncodeAccelerator::Error,
|
| media::VideoEncodeAccelerator::kErrorMax)
|
| IPC_ENUM_TRAITS_MAX_VALUE(media::VideoFrame::Format,
|
| @@ -96,6 +99,15 @@ IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params)
|
| IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info)
|
| IPC_STRUCT_END()
|
|
|
| +IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params)
|
| + IPC_STRUCT_MEMBER(int32, input_buffer_id)
|
| + IPC_STRUCT_MEMBER(gfx::Size, coded_size)
|
| + IPC_STRUCT_MEMBER(base::SharedMemoryHandle, input_buffer_handle)
|
| + IPC_STRUCT_MEMBER(uint32, input_buffer_size)
|
| + IPC_STRUCT_MEMBER(base::SharedMemoryHandle, output_video_frame_handle)
|
| + IPC_STRUCT_MEMBER(uint32, output_buffer_size)
|
| +IPC_STRUCT_END()
|
| +
|
| #if defined(OS_MACOSX)
|
| IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params)
|
| // If the browser needs framerate throttling based on GPU back-pressure to be
|
| @@ -272,6 +284,13 @@ IPC_MESSAGE_CONTROL3(GpuMsg_DestroyGpuMemoryBuffer,
|
| int32, /* client_id */
|
| int32 /* sync_point */)
|
|
|
| +// Create and initialize a hardware jpeg decoder using the specified route_id.
|
| +// Created decoders should be freed with AcceleratedJpegDecoderMsg_Destroy when
|
| +// no longer needed.
|
| +IPC_SYNC_MESSAGE_CONTROL1_1(GpuMsg_CreateJpegDecoder,
|
| + int32 /* route_id */,
|
| + bool /* succeeded */)
|
| +
|
| // Tells the GPU process to create a context for collecting graphics card
|
| // information.
|
| IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo)
|
| @@ -751,3 +770,31 @@ IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError,
|
|
|
| // Send destroy request to the encoder.
|
| IPC_MESSAGE_ROUTED0(AcceleratedVideoEncoderMsg_Destroy)
|
| +
|
| +//------------------------------------------------------------------------------
|
| +// Accelerated JPEG Decoder Messages
|
| +// These messages are sent from the Browser process to GPU process.
|
| +
|
| +// Decode one JPEG image from shared memory |input_buffer_handle| with size
|
| +// |input_buffer_size|. The input buffer is associated with |input_buffer_id|
|
| +// 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)
|
| +
|
| +// Send destroy request to the decoder.
|
| +IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy)
|
| +
|
| +//------------------------------------------------------------------------------
|
| +// Accelerated JPEG Decoder Host Messages
|
| +// These messages are sent from the GPU process to Browser process.
|
| +//
|
| +// Decoder reports that a video frame is ready.
|
| +IPC_MESSAGE_ROUTED1(AcceleratedJpegDecoderHostMsg_VideoFrameReady,
|
| + int32) /* bitstream_buffer_id */
|
| +
|
| +// Report error condition.
|
| +IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_NotifyError,
|
| + int32, /* bitstream_buffer_id */
|
| + media::JpegDecodeAccelerator::Error) /* error */
|
|
|