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

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: use GpuProcessHost instead of GpuChannelHost 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle) 291 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle)
285 IPC_STRUCT_TRAITS_MEMBER(handle) 292 IPC_STRUCT_TRAITS_MEMBER(handle)
286 IPC_STRUCT_TRAITS_MEMBER(transport_type) 293 IPC_STRUCT_TRAITS_MEMBER(transport_type)
287 IPC_STRUCT_TRAITS_END() 294 IPC_STRUCT_TRAITS_END()
288 295
289 IPC_STRUCT_TRAITS_BEGIN(media::SubsampleEntry) 296 IPC_STRUCT_TRAITS_BEGIN(media::SubsampleEntry)
290 IPC_STRUCT_TRAITS_MEMBER(clear_bytes) 297 IPC_STRUCT_TRAITS_MEMBER(clear_bytes)
291 IPC_STRUCT_TRAITS_MEMBER(cypher_bytes) 298 IPC_STRUCT_TRAITS_MEMBER(cypher_bytes)
292 IPC_STRUCT_TRAITS_END() 299 IPC_STRUCT_TRAITS_END()
293 300
301 IPC_STRUCT_TRAITS_BEGIN(media::arc::BufferMetadata)
302 IPC_STRUCT_TRAITS_MEMBER(timestamp)
303 IPC_STRUCT_TRAITS_MEMBER(flags)
304 IPC_STRUCT_TRAITS_MEMBER(bytes_used)
305 IPC_STRUCT_TRAITS_END()
306
307 IPC_STRUCT_TRAITS_BEGIN(media::arc::BufferFormat)
308 IPC_STRUCT_TRAITS_MEMBER(pixel_format)
309 IPC_STRUCT_TRAITS_MEMBER(image_size)
310 IPC_STRUCT_TRAITS_MEMBER(memory_type)
311 IPC_STRUCT_TRAITS_END()
312
313 IPC_STRUCT_TRAITS_BEGIN(media::arc::VideoFormat)
314 IPC_STRUCT_TRAITS_MEMBER(pixel_format)
315 IPC_STRUCT_TRAITS_MEMBER(image_size)
316 IPC_STRUCT_TRAITS_MEMBER(min_num_buffers)
317 IPC_STRUCT_TRAITS_MEMBER(coded_width)
318 IPC_STRUCT_TRAITS_MEMBER(coded_height)
319 IPC_STRUCT_TRAITS_MEMBER(crop_left)
320 IPC_STRUCT_TRAITS_MEMBER(crop_width)
321 IPC_STRUCT_TRAITS_MEMBER(crop_top)
322 IPC_STRUCT_TRAITS_MEMBER(crop_height)
323 IPC_STRUCT_TRAITS_END()
324
294 //------------------------------------------------------------------------------ 325 //------------------------------------------------------------------------------
295 // GPU Messages 326 // GPU Messages
296 // These are messages from the browser to the GPU process. 327 // These are messages from the browser to the GPU process.
297 328
298 // Tells the GPU process to initialize itself. The browser explicitly 329 // Tells the GPU process to initialize itself. The browser explicitly
299 // requests this be done so that we are guaranteed that the channel is set 330 // requests this be done so that we are guaranteed that the channel is set
300 // up between the browser and GPU process before doing any work that might 331 // up between the browser and GPU process before doing any work that might
301 // potentially crash the GPU process. Detection of the child process 332 // potentially crash the GPU process. Detection of the child process
302 // exiting abruptly is predicated on having the IPC channel set up. 333 // exiting abruptly is predicated on having the IPC channel set up.
303 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) 334 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize)
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) 845 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy)
815 846
816 //------------------------------------------------------------------------------ 847 //------------------------------------------------------------------------------
817 // Accelerated JPEG Decoder Host Messages 848 // Accelerated JPEG Decoder Host Messages
818 // These messages are sent from the GPU process to Browser process. 849 // These messages are sent from the GPU process to Browser process.
819 // 850 //
820 // Report decode status. 851 // Report decode status.
821 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, 852 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck,
822 int32, /* bitstream_buffer_id */ 853 int32, /* bitstream_buffer_id */
823 media::JpegDecodeAccelerator::Error /* error */) 854 media::JpegDecodeAccelerator::Error /* error */)
855
856 IPC_MESSAGE_CONTROL0(GpuMsg_CreateArcVideoAcceleratorChannel)
857 IPC_MESSAGE_CONTROL0(GpuMsg_ShutdownArcVideoService)
858 IPC_MESSAGE_CONTROL1(GpuHostMsg_ArcAcceleratorChannelCreated,
859 IPC::ChannelHandle /* handle to channel */)
860
861 // TODO in this CL(kcwu) create a new gpu_arc_messages.h ?
862 // TODO in this CL(kcwu) use IPC_ENUM_TRAITS_MAX_VALUE
863
864 IPC_SYNC_MESSAGE_CONTROL1_1(ArcAcceleratorMsg_Initialize,
865 media::arc::DeviceType /* device_type */,
866 uint32_t /* result */)
867 IPC_SYNC_MESSAGE_CONTROL5_1(ArcAcceleratorMsg_BindSharedBuffer,
868 media::arc::PortType /* port */,
869 uint32_t /* index */,
870 base::FileDescriptor /* ashmem fd */,
871 size_t /* offset */,
872 size_t /* length */,
873 uint32_t /* result */)
874 IPC_SYNC_MESSAGE_CONTROL3_1(ArcAcceleratorMsg_BindGraphicBuffer,
875 media::arc::PortType /* port */,
876 uint32_t /* index */,
877 base::FileDescriptor /* dmabuf fd */,
878 uint32_t /* result */)
879 IPC_SYNC_MESSAGE_CONTROL3_0(ArcAcceleratorMsg_UseBuffer,
880 media::arc::PortType /* port */,
881 uint32_t /* index */,
882 media::arc::BufferMetadata /* metadata */)
883 IPC_SYNC_MESSAGE_CONTROL2_2(ArcAcceleratorMsg_SetBufferCount,
884 media::arc::PortType /* port */,
885 size_t /* in_count */,
886 size_t /* out_count */,
887 uint32_t /* result */)
888 IPC_SYNC_MESSAGE_CONTROL0_0(ArcAcceleratorMsg_Reset)
889 IPC_SYNC_MESSAGE_CONTROL2_1(ArcAcceleratorMsg_SetBufferFormat,
890 media::arc::PortType /* port */,
891 media::arc::BufferFormat /* format */,
892 uint32_t /* result */)
893
894 IPC_MESSAGE_CONTROL1(ArcAcceleratorHostMsg_Error,
895 media::arc::ArcVideoAccelerator::Error /* error */)
896 IPC_MESSAGE_CONTROL1(ArcAcceleratorHostMsg_OutputFormatChanged,
897 media::arc::VideoFormat /* format */)
898 IPC_MESSAGE_CONTROL3(ArcAcceleratorHostMsg_BufferDone,
899 media::arc::PortType /* port */,
900 uint32_t /* index */,
901 media::arc::BufferMetadata /* metadata */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698