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

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

Issue 1451353002: Implement GpuArcVideoService for arc video accelerator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased with new ArcBridgeService; addressed Owen's comments Created 5 years 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 12 matching lines...) Expand all
23 #include "gpu/command_buffer/common/gpu_memory_allocation.h" 23 #include "gpu/command_buffer/common/gpu_memory_allocation.h"
24 #include "gpu/command_buffer/common/mailbox.h" 24 #include "gpu/command_buffer/common/mailbox.h"
25 #include "gpu/command_buffer/common/sync_token.h" 25 #include "gpu/command_buffer/common/sync_token.h"
26 #include "gpu/command_buffer/common/value_state.h" 26 #include "gpu/command_buffer/common/value_state.h"
27 #include "gpu/config/gpu_info.h" 27 #include "gpu/config/gpu_info.h"
28 #include "gpu/ipc/gpu_command_buffer_traits.h" 28 #include "gpu/ipc/gpu_command_buffer_traits.h"
29 #include "ipc/ipc_channel_handle.h" 29 #include "ipc/ipc_channel_handle.h"
30 #include "ipc/ipc_message_macros.h" 30 #include "ipc/ipc_message_macros.h"
31 #include "media/base/decrypt_config.h" 31 #include "media/base/decrypt_config.h"
32 #include "media/base/video_types.h" 32 #include "media/base/video_types.h"
33 #include "media/video/arc_video_accelerator.h"
33 #include "media/video/jpeg_decode_accelerator.h" 34 #include "media/video/jpeg_decode_accelerator.h"
34 #include "media/video/video_decode_accelerator.h" 35 #include "media/video/video_decode_accelerator.h"
35 #include "media/video/video_encode_accelerator.h" 36 #include "media/video/video_encode_accelerator.h"
36 #include "ui/events/latency_info.h" 37 #include "ui/events/latency_info.h"
37 #include "ui/gfx/geometry/size.h" 38 #include "ui/gfx/geometry/size.h"
38 #include "ui/gfx/gpu_memory_buffer.h" 39 #include "ui/gfx/gpu_memory_buffer.h"
39 #include "ui/gfx/ipc/gfx_param_traits.h" 40 #include "ui/gfx/ipc/gfx_param_traits.h"
40 #include "ui/gfx/native_widget_types.h" 41 #include "ui/gfx/native_widget_types.h"
41 #include "ui/gfx/swap_result.h" 42 #include "ui/gfx/swap_result.h"
42 #include "ui/gl/gpu_preference.h" 43 #include "ui/gl/gpu_preference.h"
(...skipping 28 matching lines...) Expand all
71 media::VideoEncodeAccelerator::kErrorMax) 72 media::VideoEncodeAccelerator::kErrorMax)
72 IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::VideoCodecProfile, 73 IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::VideoCodecProfile,
73 media::VIDEO_CODEC_PROFILE_MIN, 74 media::VIDEO_CODEC_PROFILE_MIN,
74 media::VIDEO_CODEC_PROFILE_MAX) 75 media::VIDEO_CODEC_PROFILE_MAX)
75 IPC_ENUM_TRAITS_MIN_MAX_VALUE(gpu::CollectInfoResult, 76 IPC_ENUM_TRAITS_MIN_MAX_VALUE(gpu::CollectInfoResult,
76 gpu::kCollectInfoNone, 77 gpu::kCollectInfoNone,
77 gpu::kCollectInfoFatalFailure) 78 gpu::kCollectInfoFatalFailure)
78 IPC_ENUM_TRAITS_MIN_MAX_VALUE(gpu::VideoCodecProfile, 79 IPC_ENUM_TRAITS_MIN_MAX_VALUE(gpu::VideoCodecProfile,
79 gpu::VIDEO_CODEC_PROFILE_MIN, 80 gpu::VIDEO_CODEC_PROFILE_MIN,
80 gpu::VIDEO_CODEC_PROFILE_MAX) 81 gpu::VIDEO_CODEC_PROFILE_MAX)
82 // TODO in this CL(kcwu) add max to enum
83 IPC_ENUM_TRAITS_MAX_VALUE(media::arc::PortType, media::arc::PORT_COUNT - 1)
84 IPC_ENUM_TRAITS_MAX_VALUE(media::arc::DeviceType, media::arc::DEVICE_DECODER)
85 IPC_ENUM_TRAITS_MAX_VALUE(media::arc::MemoryType, media::arc::MEMORY_DMABUF)
86 IPC_ENUM_TRAITS_MAX_VALUE(media::arc::ArcVideoAccelerator::Error,
87 media::arc::ArcVideoAccelerator::PLATFORM_FAILURE)
81 88
82 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) 89 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig)
83 IPC_STRUCT_MEMBER(int32, share_group_id) 90 IPC_STRUCT_MEMBER(int32, share_group_id)
84 IPC_STRUCT_MEMBER(int32, stream_id) 91 IPC_STRUCT_MEMBER(int32, stream_id)
85 IPC_STRUCT_MEMBER(content::GpuStreamPriority, stream_priority) 92 IPC_STRUCT_MEMBER(content::GpuStreamPriority, stream_priority)
86 IPC_STRUCT_MEMBER(std::vector<int>, attribs) 93 IPC_STRUCT_MEMBER(std::vector<int>, attribs)
87 IPC_STRUCT_MEMBER(GURL, active_url) 94 IPC_STRUCT_MEMBER(GURL, active_url)
88 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference) 95 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference)
89 IPC_STRUCT_END() 96 IPC_STRUCT_END()
90 97
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle) 306 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle)
300 IPC_STRUCT_TRAITS_MEMBER(handle) 307 IPC_STRUCT_TRAITS_MEMBER(handle)
301 IPC_STRUCT_TRAITS_MEMBER(transport_type) 308 IPC_STRUCT_TRAITS_MEMBER(transport_type)
302 IPC_STRUCT_TRAITS_END() 309 IPC_STRUCT_TRAITS_END()
303 310
304 IPC_STRUCT_TRAITS_BEGIN(media::SubsampleEntry) 311 IPC_STRUCT_TRAITS_BEGIN(media::SubsampleEntry)
305 IPC_STRUCT_TRAITS_MEMBER(clear_bytes) 312 IPC_STRUCT_TRAITS_MEMBER(clear_bytes)
306 IPC_STRUCT_TRAITS_MEMBER(cypher_bytes) 313 IPC_STRUCT_TRAITS_MEMBER(cypher_bytes)
307 IPC_STRUCT_TRAITS_END() 314 IPC_STRUCT_TRAITS_END()
308 315
316 IPC_STRUCT_TRAITS_BEGIN(media::arc::BufferMetadata)
317 IPC_STRUCT_TRAITS_MEMBER(timestamp)
318 IPC_STRUCT_TRAITS_MEMBER(flags)
319 IPC_STRUCT_TRAITS_MEMBER(bytes_used)
320 IPC_STRUCT_TRAITS_END()
321
322 IPC_STRUCT_TRAITS_BEGIN(media::arc::BufferFormat)
323 IPC_STRUCT_TRAITS_MEMBER(pixel_format)
324 IPC_STRUCT_TRAITS_MEMBER(image_size)
325 IPC_STRUCT_TRAITS_MEMBER(memory_type)
326 IPC_STRUCT_TRAITS_END()
327
328 IPC_STRUCT_TRAITS_BEGIN(media::arc::VideoFormat)
329 IPC_STRUCT_TRAITS_MEMBER(pixel_format)
330 IPC_STRUCT_TRAITS_MEMBER(image_size)
331 IPC_STRUCT_TRAITS_MEMBER(min_num_buffers)
332 IPC_STRUCT_TRAITS_MEMBER(coded_width)
333 IPC_STRUCT_TRAITS_MEMBER(coded_height)
334 IPC_STRUCT_TRAITS_MEMBER(crop_left)
335 IPC_STRUCT_TRAITS_MEMBER(crop_width)
336 IPC_STRUCT_TRAITS_MEMBER(crop_top)
337 IPC_STRUCT_TRAITS_MEMBER(crop_height)
338 IPC_STRUCT_TRAITS_END()
339
309 //------------------------------------------------------------------------------ 340 //------------------------------------------------------------------------------
310 // GPU Messages 341 // GPU Messages
311 // These are messages from the browser to the GPU process. 342 // These are messages from the browser to the GPU process.
312 343
313 // Tells the GPU process to initialize itself. The browser explicitly 344 // Tells the GPU process to initialize itself. The browser explicitly
314 // requests this be done so that we are guaranteed that the channel is set 345 // requests this be done so that we are guaranteed that the channel is set
315 // up between the browser and GPU process before doing any work that might 346 // up between the browser and GPU process before doing any work that might
316 // potentially crash the GPU process. Detection of the child process 347 // potentially crash the GPU process. Detection of the child process
317 // exiting abruptly is predicated on having the IPC channel set up. 348 // exiting abruptly is predicated on having the IPC channel set up.
318 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) 349 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize)
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) 863 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy)
833 864
834 //------------------------------------------------------------------------------ 865 //------------------------------------------------------------------------------
835 // Accelerated JPEG Decoder Host Messages 866 // Accelerated JPEG Decoder Host Messages
836 // These messages are sent from the GPU process to Browser process. 867 // These messages are sent from the GPU process to Browser process.
837 // 868 //
838 // Report decode status. 869 // Report decode status.
839 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, 870 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck,
840 int32, /* bitstream_buffer_id */ 871 int32, /* bitstream_buffer_id */
841 media::JpegDecodeAccelerator::Error /* error */) 872 media::JpegDecodeAccelerator::Error /* error */)
873
874 IPC_MESSAGE_CONTROL0(GpuMsg_CreateArcVideoAcceleratorChannel)
875 IPC_MESSAGE_CONTROL0(GpuMsg_ShutdownArcVideoService)
876 IPC_MESSAGE_CONTROL1(GpuHostMsg_ArcVideoAcceleratorChannelCreated,
877 IPC::ChannelHandle /* handle to channel */)
878
879 // TODO in this CL(kcwu) create a new gpu_arc_messages.h ?
880 // TODO in this CL(kcwu) use IPC_ENUM_TRAITS_MAX_VALUE
881
882 IPC_SYNC_MESSAGE_CONTROL1_1(ArcAcceleratorMsg_Initialize,
883 media::arc::DeviceType /* device_type */,
884 uint32_t /* result */)
885 IPC_SYNC_MESSAGE_CONTROL5_1(ArcAcceleratorMsg_BindSharedBuffer,
886 media::arc::PortType /* port */,
887 uint32_t /* index */,
888 base::FileDescriptor /* ashmem fd */,
889 size_t /* offset */,
890 size_t /* length */,
891 uint32_t /* result */)
892 IPC_SYNC_MESSAGE_CONTROL3_1(ArcAcceleratorMsg_BindGraphicBuffer,
893 media::arc::PortType /* port */,
894 uint32_t /* index */,
895 base::FileDescriptor /* dmabuf fd */,
896 uint32_t /* result */)
897 IPC_SYNC_MESSAGE_CONTROL3_0(ArcAcceleratorMsg_UseBuffer,
898 media::arc::PortType /* port */,
899 uint32_t /* index */,
900 media::arc::BufferMetadata /* metadata */)
901 IPC_SYNC_MESSAGE_CONTROL2_2(ArcAcceleratorMsg_SetBufferCount,
902 media::arc::PortType /* port */,
903 size_t /* in_count */,
904 size_t /* out_count */,
905 uint32_t /* result */)
906 IPC_SYNC_MESSAGE_CONTROL0_0(ArcAcceleratorMsg_Reset)
907 IPC_SYNC_MESSAGE_CONTROL2_1(ArcAcceleratorMsg_SetBufferFormat,
908 media::arc::PortType /* port */,
909 media::arc::BufferFormat /* format */,
910 uint32_t /* result */)
911
912 IPC_MESSAGE_CONTROL1(ArcAcceleratorHostMsg_Error,
913 media::arc::ArcVideoAccelerator::Error /* error */)
914 IPC_MESSAGE_CONTROL1(ArcAcceleratorHostMsg_OutputFormatChanged,
915 media::arc::VideoFormat /* format */)
916 IPC_MESSAGE_CONTROL3(ArcAcceleratorHostMsg_BufferDone,
917 media::arc::PortType /* port */,
918 uint32_t /* index */,
919 media::arc::BufferMetadata /* metadata */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698