diff options
author | Andras Becsi <andras.becsi@digia.com> | 2013-12-11 21:33:03 +0100 |
---|---|---|
committer | Andras Becsi <andras.becsi@digia.com> | 2013-12-13 12:34:07 +0100 |
commit | f2a33ff9cbc6d19943f1c7fbddd1f23d23975577 (patch) | |
tree | 0586a32aa390ade8557dfd6b4897f43a07449578 /chromium/content/common/gpu/gpu_messages.h | |
parent | 5362912cdb5eea702b68ebe23702468d17c3017a (diff) | |
download | qtwebengine-chromium-f2a33ff9cbc6d19943f1c7fbddd1f23d23975577.tar.gz |
Update Chromium to branch 1650 (31.0.1650.63)
Change-Id: I57d8c832eaec1eb2364e0a8e7352a6dd354db99f
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'chromium/content/common/gpu/gpu_messages.h')
-rw-r--r-- | chromium/content/common/gpu/gpu_messages.h | 130 |
1 files changed, 126 insertions, 4 deletions
diff --git a/chromium/content/common/gpu/gpu_messages.h b/chromium/content/common/gpu/gpu_messages.h index fabc7a1a764..3952d796dab 100644 --- a/chromium/content/common/gpu/gpu_messages.h +++ b/chromium/content/common/gpu/gpu_messages.h @@ -14,6 +14,7 @@ #include "content/common/gpu/gpu_memory_uma_stats.h" #include "content/common/gpu/gpu_process_launch_causes.h" #include "content/common/gpu/gpu_rendering_stats.h" +#include "content/common/gpu/surface_capturer.h" #include "content/public/common/common_param_traits.h" #include "content/public/common/gpu_memory_stats.h" #include "gpu/command_buffer/common/command_buffer.h" @@ -23,8 +24,10 @@ #include "gpu/ipc/gpu_command_buffer_traits.h" #include "ipc/ipc_channel_handle.h" #include "ipc/ipc_message_macros.h" +#include "media/base/video_frame.h" #include "media/video/video_decode_accelerator.h" -#include "ui/base/latency_info.h" +#include "media/video/video_encode_accelerator.h" +#include "ui/events/latency_info.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/size.h" #include "ui/gl/gpu_preference.h" @@ -37,7 +40,6 @@ IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) IPC_STRUCT_MEMBER(int32, share_group_id) - IPC_STRUCT_MEMBER(std::string, allowed_extensions) IPC_STRUCT_MEMBER(std::vector<int>, attribs) IPC_STRUCT_MEMBER(GURL, active_url) IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference) @@ -54,8 +56,6 @@ IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params) IPC_STRUCT_MEMBER(float, scale_factor) IPC_STRUCT_MEMBER(ui::LatencyInfo, latency_info) IPC_STRUCT_END() -#undef IPC_MESSAGE_EXPORT -#define IPC_MESSAGE_EXPORT IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params) IPC_STRUCT_MEMBER(int32, surface_id) @@ -70,6 +70,8 @@ IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params) IPC_STRUCT_MEMBER(float, surface_scale_factor) IPC_STRUCT_MEMBER(ui::LatencyInfo, latency_info) IPC_STRUCT_END() +#undef IPC_MESSAGE_EXPORT +#define IPC_MESSAGE_EXPORT IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceRelease_Params) IPC_STRUCT_MEMBER(int32, surface_id) @@ -82,6 +84,10 @@ IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params) #if defined(OS_MACOSX) IPC_STRUCT_MEMBER(int32, renderer_id) #endif +#if defined(OS_WIN) + IPC_STRUCT_MEMBER(base::TimeTicks, vsync_timebase) + IPC_STRUCT_MEMBER(base::TimeDelta, vsync_interval) +#endif IPC_STRUCT_END() IPC_STRUCT_BEGIN(GPUCommandBufferConsoleMessage) @@ -219,6 +225,12 @@ IPC_STRUCT_TRAITS_BEGIN(content::GpuRenderingStats) IPC_STRUCT_TRAITS_MEMBER(total_processing_commands_time) IPC_STRUCT_TRAITS_END() +IPC_ENUM_TRAITS(media::VideoFrame::Format) + +IPC_ENUM_TRAITS(media::VideoEncodeAccelerator::Error) + +IPC_ENUM_TRAITS(content::SurfaceCapturer::Error) + //------------------------------------------------------------------------------ // GPU Messages // These are messages from the browser to the GPU process. @@ -449,6 +461,12 @@ IPC_MESSAGE_CONTROL1(GpuChannelMsg_GenerateMailboxNamesAsync, IPC_MESSAGE_CONTROL1(GpuChannelMsg_GenerateMailboxNamesReply, std::vector<gpu::Mailbox> /* mailbox_names */) +// Create a new GPU-accelerated video encoder. +IPC_SYNC_MESSAGE_CONTROL0_1(GpuChannelMsg_CreateVideoEncoder, + int32 /* route_id */) + +IPC_MESSAGE_CONTROL1(GpuChannelMsg_DestroyVideoEncoder, int32 /* route_id */) + #if defined(OS_ANDROID) // Register the StreamTextureProxy class with the GPU process, so that // the renderer process will get notified whenever a frame becomes available. @@ -561,6 +579,12 @@ IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder, media::VideoCodecProfile /* profile */, int /* route_id */) +// Create and initialize a surface capturer, returning its new route_id. +// Created capturers should be freed with SurfaceCapturerMsg_Destroy when no +// longer needed. +IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_CreateSurfaceCapturer, + int /* route_id */) + // Tells the proxy that there was an error and the command buffer had to be // destroyed for some reason. IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed, @@ -692,3 +716,101 @@ IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) // Video decoder has encountered an error. IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, uint32) /* Error ID */ + +//------------------------------------------------------------------------------ +// Accelerated Video Encoder Messages +// These messages are sent from the Renderer process to GPU process. + +// Initialize the accelerated encoder. +IPC_MESSAGE_ROUTED4(AcceleratedVideoEncoderMsg_Initialize, + media::VideoFrame::Format /* input_format */, + gfx::Size /* input_visible_size */, + media::VideoCodecProfile /* output_profile */, + uint32 /* initial_bitrate */) + +// Queue a input buffer to the encoder to encode. |frame_id| will be returned by +// AcceleratedVideoEncoderHostMsg_NotifyEncodeDone. +IPC_MESSAGE_ROUTED4(AcceleratedVideoEncoderMsg_Encode, + int32 /* frame_id */, + base::SharedMemoryHandle /* buffer_handle */, + uint32 /* buffer_size */, + bool /* force_keyframe */) + +// Queue a buffer to the encoder for use in returning output. |buffer_id| will +// be returned by AcceleratedVideoEncoderHostMsg_BitstreamBufferReady. +IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer, + int32 /* buffer_id */, + base::SharedMemoryHandle /* buffer_handle */, + uint32 /* buffer_size */) + +// Request a runtime encoding parameter change. +IPC_MESSAGE_ROUTED2(AcceleratedVideoEncoderMsg_RequestEncodingParametersChange, + uint32 /* bitrate */, + uint32 /* framerate */) + +//------------------------------------------------------------------------------ +// Accelerated Video Encoder Host Messages +// These messages are sent from GPU process to Renderer process. + +// Notify of the completion of initialization. +IPC_MESSAGE_ROUTED0(AcceleratedVideoEncoderHostMsg_NotifyInitializeDone) + +// Notify renderer of the input/output buffer requirements of the encoder. +IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_RequireBitstreamBuffers, + uint32 /* input_count */, + gfx::Size /* input_coded_size */, + uint32 /* output_buffer_size */) + +// Notify the renderer that the encoder has finished using an input buffer. +// There is no congruent entry point in the media::VideoEncodeAccelerator +// interface, in VEA this same done condition is indicated by dropping the +// reference to the media::VideoFrame passed to VEA::Encode(). +IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyInputDone, + int32 /* frame_id */) + +// Notify the renderer that an output buffer has been filled with encoded data. +IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady, + int32 /* bitstream_buffer_id */, + uint32 /* payload_size */, + bool /* key_frame */) + +// Report error condition. +IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError, + media::VideoEncodeAccelerator::Error /* error */) + +//------------------------------------------------------------------------------ +// Gpu Surface Capturer Messages +// These messages are sent from the Browser process to the GPU process. + +// Initialize the capturer. +IPC_MESSAGE_ROUTED1(SurfaceCapturerMsg_Initialize, + media::VideoFrame::Format /* format */) + +// Attempt to start a capture. +IPC_MESSAGE_ROUTED0(SurfaceCapturerMsg_TryCapture) + +// Copy captured contents to a video frame. +IPC_MESSAGE_ROUTED3(SurfaceCapturerMsg_CopyCaptureToVideoFrame, + int32 /* buffer_id */, + base::SharedMemoryHandle /* buffer_shm */, + uint32 /* buffer_size */) + +// Destroy the capturer. +IPC_MESSAGE_ROUTED0(SurfaceCapturerMsg_Destroy) + +//------------------------------------------------------------------------------ +// Gpu Surface Capturer Host Messages +// These messages are sent from GPU process to Browser process. + +// Report the capture output parameters to the Browser process. +IPC_MESSAGE_ROUTED2(SurfaceCapturerHostMsg_NotifyCaptureParameters, + gfx::Size /* buffer_size */, + gfx::Rect /* visible_rect */) + +// Report successful copy of a capture of a surface. +IPC_MESSAGE_ROUTED1(SurfaceCapturerHostMsg_NotifyCopyCaptureDone, + int32 /* frame_id */) + +// Report error. +IPC_MESSAGE_ROUTED1(SurfaceCapturerHostMsg_NotifyError, + content::SurfaceCapturer::Error /* error */) |