OLD | NEW |
---|---|
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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 #elif defined(OS_MACOSX) | 48 #elif defined(OS_MACOSX) |
49 #include "ui/base/cocoa/remote_layer_api.h" | 49 #include "ui/base/cocoa/remote_layer_api.h" |
50 #include "ui/gfx/mac/io_surface.h" | 50 #include "ui/gfx/mac/io_surface.h" |
51 #endif | 51 #endif |
52 | 52 |
53 #undef IPC_MESSAGE_EXPORT | 53 #undef IPC_MESSAGE_EXPORT |
54 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 54 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
55 | 55 |
56 #define IPC_MESSAGE_START GpuMsgStart | 56 #define IPC_MESSAGE_START GpuMsgStart |
57 | 57 |
58 #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.
| |
59 #define CONTENT_COMMON_GPU_GPU_MESSAGES_H_ | |
60 | |
61 namespace IPC { | |
62 template <> | |
63 struct ParamTraits<media::BitstreamBuffer> { | |
64 using param_type = media::BitstreamBuffer; | |
65 static void Write(base::Pickle* m, const param_type& p); | |
66 static bool Read(const base::Pickle* m, | |
67 base::PickleIterator* iter, | |
68 param_type* r); | |
69 static void Log(const param_type& p, std::string* l); | |
70 }; | |
71 | |
72 } // namespace IPC | |
73 | |
74 #endif // CONTENT_COMMON_GPU_GPU_MESSAGES_H_ | |
58 IPC_ENUM_TRAITS_MAX_VALUE(content::CauseForGpuLaunch, | 75 IPC_ENUM_TRAITS_MAX_VALUE(content::CauseForGpuLaunch, |
59 content::CAUSE_FOR_GPU_LAUNCH_MAX_ENUM - 1) | 76 content::CAUSE_FOR_GPU_LAUNCH_MAX_ENUM - 1) |
60 IPC_ENUM_TRAITS_MAX_VALUE(gfx::GpuPreference, | 77 IPC_ENUM_TRAITS_MAX_VALUE(gfx::GpuPreference, |
61 gfx::GpuPreferenceLast) | 78 gfx::GpuPreferenceLast) |
62 IPC_ENUM_TRAITS_MAX_VALUE(content::GpuStreamPriority, | 79 IPC_ENUM_TRAITS_MAX_VALUE(content::GpuStreamPriority, |
63 content::GpuStreamPriority::LAST) | 80 content::GpuStreamPriority::LAST) |
64 IPC_ENUM_TRAITS_MAX_VALUE(gfx::SurfaceType, | 81 IPC_ENUM_TRAITS_MAX_VALUE(gfx::SurfaceType, |
65 gfx::SURFACE_TYPE_LAST) | 82 gfx::SURFACE_TYPE_LAST) |
66 IPC_ENUM_TRAITS_MAX_VALUE(gfx::SwapResult, gfx::SwapResult::SWAP_RESULT_LAST) | 83 IPC_ENUM_TRAITS_MAX_VALUE(gfx::SwapResult, gfx::SwapResult::SWAP_RESULT_LAST) |
67 IPC_ENUM_TRAITS_MAX_VALUE(gpu::MemoryAllocation::PriorityCutoff, | 84 IPC_ENUM_TRAITS_MAX_VALUE(gpu::MemoryAllocation::PriorityCutoff, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 IPC_STRUCT_END() | 146 IPC_STRUCT_END() |
130 | 147 |
131 IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params) | 148 IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params) |
132 // The vsync parameters, to synchronize presentation with the display. | 149 // The vsync parameters, to synchronize presentation with the display. |
133 IPC_STRUCT_MEMBER(base::TimeTicks, vsync_timebase) | 150 IPC_STRUCT_MEMBER(base::TimeTicks, vsync_timebase) |
134 IPC_STRUCT_MEMBER(base::TimeDelta, vsync_interval) | 151 IPC_STRUCT_MEMBER(base::TimeDelta, vsync_interval) |
135 IPC_STRUCT_END() | 152 IPC_STRUCT_END() |
136 #endif | 153 #endif |
137 | 154 |
138 IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params) | 155 IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params) |
139 IPC_STRUCT_MEMBER(int32_t, input_buffer_id) | 156 IPC_STRUCT_MEMBER(media::BitstreamBuffer, input_buffer) |
140 IPC_STRUCT_MEMBER(gfx::Size, coded_size) | 157 IPC_STRUCT_MEMBER(gfx::Size, coded_size) |
141 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, input_buffer_handle) | |
142 IPC_STRUCT_MEMBER(uint32_t, input_buffer_size) | |
143 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, output_video_frame_handle) | 158 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, output_video_frame_handle) |
144 IPC_STRUCT_MEMBER(uint32_t, output_buffer_size) | 159 IPC_STRUCT_MEMBER(uint32_t, output_buffer_size) |
145 IPC_STRUCT_END() | 160 IPC_STRUCT_END() |
146 | 161 |
147 IPC_STRUCT_BEGIN(AcceleratedVideoDecoderMsg_Decode_Params) | |
148 IPC_STRUCT_MEMBER(int32_t, bitstream_buffer_id) | |
149 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle) | |
150 IPC_STRUCT_MEMBER(uint32_t, size) | |
151 IPC_STRUCT_MEMBER(base::TimeDelta, presentation_timestamp) | |
152 IPC_STRUCT_MEMBER(std::string, key_id) | |
153 IPC_STRUCT_MEMBER(std::string, iv) | |
154 IPC_STRUCT_MEMBER(std::vector<media::SubsampleEntry>, subsamples) | |
155 IPC_STRUCT_END() | |
156 | |
157 IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params) | 162 IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params) |
158 IPC_STRUCT_MEMBER(int32_t, frame_id) | 163 IPC_STRUCT_MEMBER(int32_t, frame_id) |
159 IPC_STRUCT_MEMBER(base::TimeDelta, timestamp) | 164 IPC_STRUCT_MEMBER(base::TimeDelta, timestamp) |
160 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle) | 165 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle) |
161 IPC_STRUCT_MEMBER(uint32_t, buffer_offset) | 166 IPC_STRUCT_MEMBER(uint32_t, buffer_offset) |
162 IPC_STRUCT_MEMBER(uint32_t, buffer_size) | 167 IPC_STRUCT_MEMBER(uint32_t, buffer_size) |
163 IPC_STRUCT_MEMBER(bool, force_keyframe) | 168 IPC_STRUCT_MEMBER(bool, force_keyframe) |
164 IPC_STRUCT_END() | 169 IPC_STRUCT_END() |
165 | 170 |
166 IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params2) | 171 IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params2) |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
679 | 684 |
680 //------------------------------------------------------------------------------ | 685 //------------------------------------------------------------------------------ |
681 // Accelerated Video Decoder Messages | 686 // Accelerated Video Decoder Messages |
682 // These messages are sent from Renderer process to GPU process. | 687 // These messages are sent from Renderer process to GPU process. |
683 | 688 |
684 // Set a CDM on the decoder to handle encrypted buffers. | 689 // Set a CDM on the decoder to handle encrypted buffers. |
685 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_SetCdm, | 690 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_SetCdm, |
686 int32_t) /* CDM ID */ | 691 int32_t) /* CDM ID */ |
687 | 692 |
688 // Send input buffer for decoding. | 693 // Send input buffer for decoding. |
689 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode, | 694 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode, media::BitstreamBuffer) |
690 AcceleratedVideoDecoderMsg_Decode_Params) | |
691 | 695 |
692 // Give the texture IDs for the textures the decoder will use for output. | 696 // Give the texture IDs for the textures the decoder will use for output. |
693 IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffers, | 697 IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffers, |
694 std::vector<int32_t>, /* Picture buffer ID */ | 698 std::vector<int32_t>, /* Picture buffer ID */ |
695 std::vector<uint32_t>) /* Texture ID */ | 699 std::vector<uint32_t>) /* Texture ID */ |
696 | 700 |
697 // Send from Renderer process to the GPU process to recycle the given picture | 701 // Send from Renderer process to the GPU process to recycle the given picture |
698 // buffer for further decoding. | 702 // buffer for further decoding. |
699 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_ReusePictureBuffer, | 703 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_ReusePictureBuffer, |
700 int32_t) /* Picture buffer ID */ | 704 int32_t) /* Picture buffer ID */ |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
823 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) | 827 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) |
824 | 828 |
825 //------------------------------------------------------------------------------ | 829 //------------------------------------------------------------------------------ |
826 // Accelerated JPEG Decoder Host Messages | 830 // Accelerated JPEG Decoder Host Messages |
827 // These messages are sent from the GPU process to Browser process. | 831 // These messages are sent from the GPU process to Browser process. |
828 // | 832 // |
829 // Report decode status. | 833 // Report decode status. |
830 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, | 834 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, |
831 int32_t, /* bitstream_buffer_id */ | 835 int32_t, /* bitstream_buffer_id */ |
832 media::JpegDecodeAccelerator::Error /* error */) | 836 media::JpegDecodeAccelerator::Error /* error */) |
OLD | NEW |