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

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

Issue 1656433002: Sample code: IPC Transport object for GPU Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GpuMemoryBufferService + Transport object. TODO: Eliminate ChildThreadImpl dependency Created 4 years, 10 months 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/memory/shared_memory.h" 13 #include "base/memory/shared_memory.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "content/common/content_param_traits.h" 16 #include "content/common/content_param_traits.h"
17 #include "content/common/gpu/command_buffer_console_message.h"
18 #include "content/common/gpu/create_gpu_memory_buffer_from_handle_params.h"
19 #include "content/common/gpu/create_gpu_memory_buffer_params.h"
20 #include "content/common/gpu/create_image_params.h"
21 #include "content/common/gpu/gpu_create_command_buffer_config.h"
17 #include "content/common/gpu/gpu_memory_uma_stats.h" 22 #include "content/common/gpu/gpu_memory_uma_stats.h"
18 #include "content/common/gpu/gpu_process_launch_causes.h" 23 #include "content/common/gpu/gpu_process_launch_causes.h"
19 #include "content/common/gpu/gpu_result_codes.h" 24 #include "content/common/gpu/gpu_result_codes.h"
20 #include "content/common/gpu/gpu_stream_priority.h" 25 #include "content/common/gpu/gpu_stream_priority.h"
26 #include "content/common/gpu/jpeg_decode_params.h"
27 #include "content/common/gpu/video_decode_params.h"
28 #include "content/common/gpu/video_encode_params.h"
21 #include "content/public/common/common_param_traits.h" 29 #include "content/public/common/common_param_traits.h"
22 #include "content/public/common/gpu_memory_stats.h" 30 #include "content/public/common/gpu_memory_stats.h"
23 #include "gpu/command_buffer/common/capabilities.h" 31 #include "gpu/command_buffer/common/capabilities.h"
24 #include "gpu/command_buffer/common/command_buffer.h" 32 #include "gpu/command_buffer/common/command_buffer.h"
25 #include "gpu/command_buffer/common/constants.h" 33 #include "gpu/command_buffer/common/constants.h"
26 #include "gpu/command_buffer/common/gpu_memory_allocation.h" 34 #include "gpu/command_buffer/common/gpu_memory_allocation.h"
27 #include "gpu/command_buffer/common/mailbox.h" 35 #include "gpu/command_buffer/common/mailbox.h"
28 #include "gpu/command_buffer/common/sync_token.h" 36 #include "gpu/command_buffer/common/sync_token.h"
29 #include "gpu/command_buffer/common/value_state.h" 37 #include "gpu/command_buffer/common/value_state.h"
30 #include "gpu/config/gpu_info.h" 38 #include "gpu/config/gpu_info.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::VideoCodecProfile, 86 IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::VideoCodecProfile,
79 media::VIDEO_CODEC_PROFILE_MIN, 87 media::VIDEO_CODEC_PROFILE_MIN,
80 media::VIDEO_CODEC_PROFILE_MAX) 88 media::VIDEO_CODEC_PROFILE_MAX)
81 IPC_ENUM_TRAITS_MIN_MAX_VALUE(gpu::CollectInfoResult, 89 IPC_ENUM_TRAITS_MIN_MAX_VALUE(gpu::CollectInfoResult,
82 gpu::kCollectInfoNone, 90 gpu::kCollectInfoNone,
83 gpu::kCollectInfoFatalFailure) 91 gpu::kCollectInfoFatalFailure)
84 IPC_ENUM_TRAITS_MIN_MAX_VALUE(gpu::VideoCodecProfile, 92 IPC_ENUM_TRAITS_MIN_MAX_VALUE(gpu::VideoCodecProfile,
85 gpu::VIDEO_CODEC_PROFILE_MIN, 93 gpu::VIDEO_CODEC_PROFILE_MIN,
86 gpu::VIDEO_CODEC_PROFILE_MAX) 94 gpu::VIDEO_CODEC_PROFILE_MAX)
87 95
88 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) 96 IPC_STRUCT_TRAITS_BEGIN(content::GpuCreateCommandBufferConfig)
89 IPC_STRUCT_MEMBER(int32_t, share_group_id) 97 IPC_STRUCT_TRAITS_MEMBER(share_group_id)
90 IPC_STRUCT_MEMBER(int32_t, stream_id) 98 IPC_STRUCT_TRAITS_MEMBER(stream_id)
91 IPC_STRUCT_MEMBER(content::GpuStreamPriority, stream_priority) 99 IPC_STRUCT_TRAITS_MEMBER(stream_priority)
92 IPC_STRUCT_MEMBER(std::vector<int>, attribs) 100 IPC_STRUCT_TRAITS_MEMBER(attribs)
93 IPC_STRUCT_MEMBER(GURL, active_url) 101 IPC_STRUCT_TRAITS_MEMBER(active_url)
94 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference) 102 IPC_STRUCT_TRAITS_MEMBER(gpu_preference)
95 IPC_STRUCT_END() 103 IPC_STRUCT_TRAITS_END()
96 104
97 IPC_STRUCT_BEGIN(GpuMsg_EstablishChannel_Params) 105 IPC_STRUCT_BEGIN(GpuMsg_EstablishChannel_Params)
98 IPC_STRUCT_MEMBER(int, client_id) 106 IPC_STRUCT_MEMBER(int, client_id)
99 IPC_STRUCT_MEMBER(uint64_t, client_tracing_id) 107 IPC_STRUCT_MEMBER(uint64_t, client_tracing_id)
100 IPC_STRUCT_MEMBER(bool, preempts) 108 IPC_STRUCT_MEMBER(bool, preempts)
101 IPC_STRUCT_MEMBER(bool, preempted) 109 IPC_STRUCT_MEMBER(bool, preempted)
102 IPC_STRUCT_MEMBER(bool, allow_real_time_streams) 110 IPC_STRUCT_MEMBER(bool, allow_real_time_streams)
103 IPC_STRUCT_END() 111 IPC_STRUCT_END()
104 112
105 IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBuffer_Params) 113 IPC_STRUCT_TRAITS_BEGIN(content::CreateGpuMemoryBufferParams)
106 IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id) 114 IPC_STRUCT_TRAITS_MEMBER(id)
107 IPC_STRUCT_MEMBER(gfx::Size, size) 115 IPC_STRUCT_TRAITS_MEMBER(size)
108 IPC_STRUCT_MEMBER(gfx::BufferFormat, format) 116 IPC_STRUCT_TRAITS_MEMBER(format)
109 IPC_STRUCT_MEMBER(gfx::BufferUsage, usage) 117 IPC_STRUCT_TRAITS_MEMBER(usage)
110 IPC_STRUCT_MEMBER(int32_t, client_id) 118 IPC_STRUCT_TRAITS_MEMBER(client_id)
111 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, surface_handle) 119 IPC_STRUCT_TRAITS_MEMBER(surface_handle)
112 IPC_STRUCT_END() 120 IPC_STRUCT_TRAITS_END()
113 121
114 IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBufferFromHandle_Params) 122 IPC_STRUCT_TRAITS_BEGIN(content::CreateGpuMemoryBufferFromHandleParams)
115 IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferHandle, handle) 123 IPC_STRUCT_TRAITS_MEMBER(handle)
116 IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id) 124 IPC_STRUCT_TRAITS_MEMBER(id)
117 IPC_STRUCT_MEMBER(gfx::Size, size) 125 IPC_STRUCT_TRAITS_MEMBER(size)
118 IPC_STRUCT_MEMBER(gfx::BufferFormat, format) 126 IPC_STRUCT_TRAITS_MEMBER(format)
119 IPC_STRUCT_MEMBER(int32_t, client_id) 127 IPC_STRUCT_TRAITS_MEMBER(client_id)
120 IPC_STRUCT_END() 128 IPC_STRUCT_TRAITS_END()
121 129
122 #if defined(OS_MACOSX) 130 #if defined(OS_MACOSX)
123 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params) 131 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params)
124 IPC_STRUCT_MEMBER(int32_t, surface_id) 132 IPC_STRUCT_MEMBER(int32_t, surface_id)
125 // Only one of ca_context_id or io_surface may be non-0. 133 // Only one of ca_context_id or io_surface may be non-0.
126 IPC_STRUCT_MEMBER(CAContextID, ca_context_id) 134 IPC_STRUCT_MEMBER(CAContextID, ca_context_id)
127 IPC_STRUCT_MEMBER(gfx::ScopedRefCountedIOSurfaceMachPort, io_surface) 135 IPC_STRUCT_MEMBER(gfx::ScopedRefCountedIOSurfaceMachPort, io_surface)
128 IPC_STRUCT_MEMBER(int32_t, route_id) 136 IPC_STRUCT_MEMBER(int32_t, route_id)
129 IPC_STRUCT_MEMBER(gfx::Size, size) 137 IPC_STRUCT_MEMBER(gfx::Size, size)
130 IPC_STRUCT_MEMBER(float, scale_factor) 138 IPC_STRUCT_MEMBER(float, scale_factor)
131 IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info) 139 IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info)
132 IPC_STRUCT_END() 140 IPC_STRUCT_END()
133 141
134 IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params) 142 IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params)
135 // The vsync parameters, to synchronize presentation with the display. 143 // The vsync parameters, to synchronize presentation with the display.
136 IPC_STRUCT_MEMBER(base::TimeTicks, vsync_timebase) 144 IPC_STRUCT_MEMBER(base::TimeTicks, vsync_timebase)
137 IPC_STRUCT_MEMBER(base::TimeDelta, vsync_interval) 145 IPC_STRUCT_MEMBER(base::TimeDelta, vsync_interval)
138 IPC_STRUCT_END() 146 IPC_STRUCT_END()
139 #endif 147 #endif
140 148
141 IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params) 149 IPC_STRUCT_TRAITS_BEGIN(content::JpegDecodeParams)
142 IPC_STRUCT_MEMBER(int32_t, input_buffer_id) 150 IPC_STRUCT_TRAITS_MEMBER(input_buffer_id)
143 IPC_STRUCT_MEMBER(gfx::Size, coded_size) 151 IPC_STRUCT_TRAITS_MEMBER(coded_size)
144 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, input_buffer_handle) 152 IPC_STRUCT_TRAITS_MEMBER(input_buffer_handle)
145 IPC_STRUCT_MEMBER(uint32_t, input_buffer_size) 153 IPC_STRUCT_TRAITS_MEMBER(input_buffer_size)
146 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, output_video_frame_handle) 154 IPC_STRUCT_TRAITS_MEMBER(output_video_frame_handle)
147 IPC_STRUCT_MEMBER(uint32_t, output_buffer_size) 155 IPC_STRUCT_TRAITS_MEMBER(output_buffer_size)
148 IPC_STRUCT_END() 156 IPC_STRUCT_TRAITS_END()
149 157
150 IPC_STRUCT_BEGIN(AcceleratedVideoDecoderMsg_Decode_Params) 158 IPC_STRUCT_TRAITS_BEGIN(content::VideoDecodeParams)
151 IPC_STRUCT_MEMBER(int32_t, bitstream_buffer_id) 159 IPC_STRUCT_TRAITS_MEMBER(bitstream_buffer_id)
152 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle) 160 IPC_STRUCT_TRAITS_MEMBER(buffer_handle)
153 IPC_STRUCT_MEMBER(uint32_t, size) 161 IPC_STRUCT_TRAITS_MEMBER(size)
154 IPC_STRUCT_MEMBER(base::TimeDelta, presentation_timestamp) 162 IPC_STRUCT_TRAITS_MEMBER(presentation_timestamp)
155 IPC_STRUCT_MEMBER(std::string, key_id) 163 IPC_STRUCT_TRAITS_MEMBER(key_id)
156 IPC_STRUCT_MEMBER(std::string, iv) 164 IPC_STRUCT_TRAITS_MEMBER(iv)
157 IPC_STRUCT_MEMBER(std::vector<media::SubsampleEntry>, subsamples) 165 IPC_STRUCT_TRAITS_MEMBER(subsamples)
158 IPC_STRUCT_END() 166 IPC_STRUCT_TRAITS_END()
159 167
160 IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params) 168 IPC_STRUCT_TRAITS_BEGIN(content::VideoEncodeParams)
161 IPC_STRUCT_MEMBER(int32_t, frame_id) 169 IPC_STRUCT_TRAITS_MEMBER(frame_id)
162 IPC_STRUCT_MEMBER(base::TimeDelta, timestamp) 170 IPC_STRUCT_TRAITS_MEMBER(timestamp)
163 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle) 171 IPC_STRUCT_TRAITS_MEMBER(buffer_handle)
164 IPC_STRUCT_MEMBER(uint32_t, buffer_offset) 172 IPC_STRUCT_TRAITS_MEMBER(buffer_offset)
165 IPC_STRUCT_MEMBER(uint32_t, buffer_size) 173 IPC_STRUCT_TRAITS_MEMBER(buffer_size)
166 IPC_STRUCT_MEMBER(bool, force_keyframe) 174 IPC_STRUCT_TRAITS_MEMBER(force_keyframe)
167 IPC_STRUCT_END() 175 IPC_STRUCT_TRAITS_END()
168 176
169 IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params2) 177 IPC_STRUCT_TRAITS_BEGIN(content::VideoEncodeParams2)
170 IPC_STRUCT_MEMBER(int32_t, frame_id) 178 IPC_STRUCT_TRAITS_MEMBER(frame_id)
171 IPC_STRUCT_MEMBER(base::TimeDelta, timestamp) 179 IPC_STRUCT_TRAITS_MEMBER(timestamp)
172 IPC_STRUCT_MEMBER(std::vector<gfx::GpuMemoryBufferHandle>, 180 IPC_STRUCT_TRAITS_MEMBER(gpu_memory_buffer_handles)
173 gpu_memory_buffer_handles) 181 IPC_STRUCT_TRAITS_MEMBER(size)
174 IPC_STRUCT_MEMBER(gfx::Size, size) 182 IPC_STRUCT_TRAITS_MEMBER(force_keyframe)
175 IPC_STRUCT_MEMBER(bool, force_keyframe) 183 IPC_STRUCT_TRAITS_END()
176 IPC_STRUCT_END()
177 184
178 IPC_STRUCT_BEGIN(GPUCommandBufferConsoleMessage) 185 IPC_STRUCT_TRAITS_BEGIN(content::CommandBufferConsoleMessage)
179 IPC_STRUCT_MEMBER(int32_t, id) 186 IPC_STRUCT_TRAITS_MEMBER(id)
180 IPC_STRUCT_MEMBER(std::string, message) 187 IPC_STRUCT_TRAITS_MEMBER(message)
181 IPC_STRUCT_END() 188 IPC_STRUCT_TRAITS_END()
182 189
183 #if defined(OS_ANDROID) 190 #if defined(OS_ANDROID)
184 IPC_STRUCT_BEGIN(GpuStreamTextureMsg_MatrixChanged_Params) 191 IPC_STRUCT_BEGIN(GpuStreamTextureMsg_MatrixChanged_Params)
185 IPC_STRUCT_MEMBER(float, m00) 192 IPC_STRUCT_MEMBER(float, m00)
186 IPC_STRUCT_MEMBER(float, m01) 193 IPC_STRUCT_MEMBER(float, m01)
187 IPC_STRUCT_MEMBER(float, m02) 194 IPC_STRUCT_MEMBER(float, m02)
188 IPC_STRUCT_MEMBER(float, m03) 195 IPC_STRUCT_MEMBER(float, m03)
189 IPC_STRUCT_MEMBER(float, m10) 196 IPC_STRUCT_MEMBER(float, m10)
190 IPC_STRUCT_MEMBER(float, m11) 197 IPC_STRUCT_MEMBER(float, m11)
191 IPC_STRUCT_MEMBER(float, m12) 198 IPC_STRUCT_MEMBER(float, m12)
192 IPC_STRUCT_MEMBER(float, m13) 199 IPC_STRUCT_MEMBER(float, m13)
193 IPC_STRUCT_MEMBER(float, m20) 200 IPC_STRUCT_MEMBER(float, m20)
194 IPC_STRUCT_MEMBER(float, m21) 201 IPC_STRUCT_MEMBER(float, m21)
195 IPC_STRUCT_MEMBER(float, m22) 202 IPC_STRUCT_MEMBER(float, m22)
196 IPC_STRUCT_MEMBER(float, m23) 203 IPC_STRUCT_MEMBER(float, m23)
197 IPC_STRUCT_MEMBER(float, m30) 204 IPC_STRUCT_MEMBER(float, m30)
198 IPC_STRUCT_MEMBER(float, m31) 205 IPC_STRUCT_MEMBER(float, m31)
199 IPC_STRUCT_MEMBER(float, m32) 206 IPC_STRUCT_MEMBER(float, m32)
200 IPC_STRUCT_MEMBER(float, m33) 207 IPC_STRUCT_MEMBER(float, m33)
201 IPC_STRUCT_END() 208 IPC_STRUCT_END()
202 #endif 209 #endif
203 210
204 IPC_STRUCT_BEGIN(GpuCommandBufferMsg_CreateImage_Params) 211 IPC_STRUCT_TRAITS_BEGIN(content::CreateImageParams)
205 IPC_STRUCT_MEMBER(int32_t, id) 212 IPC_STRUCT_TRAITS_MEMBER(id)
206 IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferHandle, gpu_memory_buffer) 213 IPC_STRUCT_TRAITS_MEMBER(gpu_memory_buffer)
207 IPC_STRUCT_MEMBER(gfx::Size, size) 214 IPC_STRUCT_TRAITS_MEMBER(size)
208 IPC_STRUCT_MEMBER(gfx::BufferFormat, format) 215 IPC_STRUCT_TRAITS_MEMBER(format)
209 IPC_STRUCT_MEMBER(uint32_t, internal_format) 216 IPC_STRUCT_TRAITS_MEMBER(internal_format)
210 IPC_STRUCT_MEMBER(uint64_t, image_release_count) 217 IPC_STRUCT_TRAITS_MEMBER(image_release_count)
211 IPC_STRUCT_END() 218 IPC_STRUCT_TRAITS_END()
212 219
213 IPC_STRUCT_TRAITS_BEGIN(gpu::DxDiagNode) 220 IPC_STRUCT_TRAITS_BEGIN(gpu::DxDiagNode)
214 IPC_STRUCT_TRAITS_MEMBER(values) 221 IPC_STRUCT_TRAITS_MEMBER(values)
215 IPC_STRUCT_TRAITS_MEMBER(children) 222 IPC_STRUCT_TRAITS_MEMBER(children)
216 IPC_STRUCT_TRAITS_END() 223 IPC_STRUCT_TRAITS_END()
217 224
218 IPC_STRUCT_TRAITS_BEGIN(gpu::GPUInfo::GPUDevice) 225 IPC_STRUCT_TRAITS_BEGIN(gpu::GPUInfo::GPUDevice)
219 IPC_STRUCT_TRAITS_MEMBER(vendor_id) 226 IPC_STRUCT_TRAITS_MEMBER(vendor_id)
220 IPC_STRUCT_TRAITS_MEMBER(device_id) 227 IPC_STRUCT_TRAITS_MEMBER(device_id)
221 IPC_STRUCT_TRAITS_MEMBER(active) 228 IPC_STRUCT_TRAITS_MEMBER(active)
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 GpuMsg_EstablishChannel_Params /* params */) 349 GpuMsg_EstablishChannel_Params /* params */)
343 350
344 // Tells the GPU process to close the channel identified by IPC channel 351 // Tells the GPU process to close the channel identified by IPC channel
345 // handle. If no channel can be identified, do nothing. 352 // handle. If no channel can be identified, do nothing.
346 IPC_MESSAGE_CONTROL1(GpuMsg_CloseChannel, 353 IPC_MESSAGE_CONTROL1(GpuMsg_CloseChannel,
347 IPC::ChannelHandle /* channel_handle */) 354 IPC::ChannelHandle /* channel_handle */)
348 355
349 // Tells the GPU process to create a new command buffer that renders directly 356 // Tells the GPU process to create a new command buffer that renders directly
350 // to a native view. A corresponding GpuCommandBufferStub is created. 357 // to a native view. A corresponding GpuCommandBufferStub is created.
351 IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer, 358 IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer,
352 gfx::GLSurfaceHandle, /* compositing_surface */ 359 gfx::GLSurfaceHandle, /* compositing_surface */
353 int32_t, /* client_id */ 360 int32_t, /* client_id */
354 GPUCreateCommandBufferConfig, /* init_params */ 361 content::GpuCreateCommandBufferConfig, /* init_params */
355 int32_t /* route_id */) 362 int32_t /* route_id */)
356 363
357 // Tells the GPU process to create a new gpu memory buffer. 364 // Tells the GPU process to create a new gpu memory buffer.
358 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBuffer, 365 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBuffer,
359 GpuMsg_CreateGpuMemoryBuffer_Params) 366 content::CreateGpuMemoryBufferParams)
360 367
361 // Tells the GPU process to create a new gpu memory buffer from an existing 368 // Tells the GPU process to create a new gpu memory buffer from an existing
362 // handle. 369 // handle.
363 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBufferFromHandle, 370 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBufferFromHandle,
364 GpuMsg_CreateGpuMemoryBufferFromHandle_Params) 371 content::CreateGpuMemoryBufferFromHandleParams)
365 372
366 // Tells the GPU process to destroy buffer. 373 // Tells the GPU process to destroy buffer.
367 IPC_MESSAGE_CONTROL3(GpuMsg_DestroyGpuMemoryBuffer, 374 IPC_MESSAGE_CONTROL3(GpuMsg_DestroyGpuMemoryBuffer,
368 gfx::GpuMemoryBufferId, /* id */ 375 gfx::GpuMemoryBufferId, /* id */
369 int32_t, /* client_id */ 376 int32_t, /* client_id */
370 gpu::SyncToken /* sync_token */) 377 gpu::SyncToken /* sync_token */)
371 378
372 // Create and initialize a hardware jpeg decoder using the specified route_id. 379 // Create and initialize a hardware jpeg decoder using the specified route_id.
373 // Created decoders should be freed with AcceleratedJpegDecoderMsg_Destroy when 380 // Created decoders should be freed with AcceleratedJpegDecoderMsg_Destroy when
374 // no longer needed. 381 // no longer needed.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription, 519 IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription,
513 int32_t /* client_id */, 520 int32_t /* client_id */,
514 unsigned int /* target */) 521 unsigned int /* target */)
515 522
516 //------------------------------------------------------------------------------ 523 //------------------------------------------------------------------------------
517 // GPU Channel Messages 524 // GPU Channel Messages
518 // These are messages from a renderer process to the GPU process. 525 // These are messages from a renderer process to the GPU process.
519 526
520 // Tells the GPU process to create a new command buffer that renders to an 527 // Tells the GPU process to create a new command buffer that renders to an
521 // offscreen frame buffer. 528 // offscreen frame buffer.
522 IPC_SYNC_MESSAGE_CONTROL3_1(GpuChannelMsg_CreateOffscreenCommandBuffer, 529 IPC_SYNC_MESSAGE_CONTROL3_1(
523 gfx::Size, /* size */ 530 GpuChannelMsg_CreateOffscreenCommandBuffer,
524 GPUCreateCommandBufferConfig, /* init_params */ 531 gfx::Size, /* size */
525 int32_t, /* route_id */ 532 content::GpuCreateCommandBufferConfig, /* init_params */
526 bool /* succeeded */) 533 int32_t, /* route_id */
534 bool /* succeeded */)
527 535
528 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its 536 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its
529 // destructor, so that the stub deletes the actual CommandBufferService 537 // destructor, so that the stub deletes the actual CommandBufferService
530 // object that it's hosting. 538 // object that it's hosting.
531 IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyCommandBuffer, 539 IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyCommandBuffer,
532 int32_t /* instance_id */) 540 int32_t /* instance_id */)
533 541
534 // Simple NOP message which can be used as fence to ensure all previous sent 542 // Simple NOP message which can be used as fence to ensure all previous sent
535 // messages have been received. 543 // messages have been received.
536 IPC_SYNC_MESSAGE_CONTROL0_0(GpuChannelMsg_Nop) 544 IPC_SYNC_MESSAGE_CONTROL0_0(GpuChannelMsg_Nop)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 // Caller passes its current put offset. Current state (including get offset) 606 // Caller passes its current put offset. Current state (including get offset)
599 // is returned in shared memory. The input latency info for the current 607 // is returned in shared memory. The input latency info for the current
600 // frame is also sent to the GPU process. 608 // frame is also sent to the GPU process.
601 IPC_MESSAGE_ROUTED3(GpuCommandBufferMsg_AsyncFlush, 609 IPC_MESSAGE_ROUTED3(GpuCommandBufferMsg_AsyncFlush,
602 int32_t /* put_offset */, 610 int32_t /* put_offset */,
603 uint32_t /* flush_count */, 611 uint32_t /* flush_count */,
604 std::vector<ui::LatencyInfo> /* latency_info */) 612 std::vector<ui::LatencyInfo> /* latency_info */)
605 613
606 // Sent by the GPU process to display messages in the console. 614 // Sent by the GPU process to display messages in the console.
607 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ConsoleMsg, 615 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ConsoleMsg,
608 GPUCommandBufferConsoleMessage /* msg */) 616 content::CommandBufferConsoleMessage /* msg */)
609 617
610 // Register an existing shared memory transfer buffer. The id that can be 618 // Register an existing shared memory transfer buffer. The id that can be
611 // used to identify the transfer buffer from a command buffer. 619 // used to identify the transfer buffer from a command buffer.
612 IPC_MESSAGE_ROUTED3(GpuCommandBufferMsg_RegisterTransferBuffer, 620 IPC_MESSAGE_ROUTED3(GpuCommandBufferMsg_RegisterTransferBuffer,
613 int32_t /* id */, 621 int32_t /* id */,
614 base::SharedMemoryHandle /* transfer_buffer */, 622 base::SharedMemoryHandle /* transfer_buffer */,
615 uint32_t /* size */) 623 uint32_t /* size */)
616 624
617 // Destroy a previously created transfer buffer. 625 // Destroy a previously created transfer buffer.
618 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyTransferBuffer, int32_t /* id */) 626 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyTransferBuffer, int32_t /* id */)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_SignalQuery, 670 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_SignalQuery,
663 uint32_t /* query */, 671 uint32_t /* query */,
664 uint32_t /* signal_id */) 672 uint32_t /* signal_id */)
665 673
666 // Response to SignalSyncPoint, SignalSyncToken, and SignalQuery. 674 // Response to SignalSyncPoint, SignalSyncToken, and SignalQuery.
667 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SignalAck, uint32_t /* signal_id */) 675 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SignalAck, uint32_t /* signal_id */)
668 676
669 // Create an image from an existing gpu memory buffer. The id that can be 677 // Create an image from an existing gpu memory buffer. The id that can be
670 // used to identify the image from a command buffer. 678 // used to identify the image from a command buffer.
671 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_CreateImage, 679 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_CreateImage,
672 GpuCommandBufferMsg_CreateImage_Params /* params */) 680 content::CreateImageParams /* params */)
673 681
674 // Destroy a previously created image. 682 // Destroy a previously created image.
675 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyImage, int32_t /* id */) 683 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyImage, int32_t /* id */)
676 684
677 // Attaches an external image stream to the client texture. 685 // Attaches an external image stream to the client texture.
678 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateStreamTexture, 686 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateStreamTexture,
679 uint32_t, /* client_texture_id */ 687 uint32_t, /* client_texture_id */
680 int32_t, /* stream_id */ 688 int32_t, /* stream_id */
681 bool /* succeeded */) 689 bool /* succeeded */)
682 690
683 //------------------------------------------------------------------------------ 691 //------------------------------------------------------------------------------
684 // Accelerated Video Decoder Messages 692 // Accelerated Video Decoder Messages
685 // These messages are sent from Renderer process to GPU process. 693 // These messages are sent from Renderer process to GPU process.
686 694
687 // Set a CDM on the decoder to handle encrypted buffers. 695 // Set a CDM on the decoder to handle encrypted buffers.
688 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_SetCdm, 696 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_SetCdm,
689 int32_t) /* CDM ID */ 697 int32_t) /* CDM ID */
690 698
691 // Send input buffer for decoding. 699 // Send input buffer for decoding.
692 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode, 700 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode,
693 AcceleratedVideoDecoderMsg_Decode_Params) 701 content::VideoDecodeParams)
694 702
695 // Give the texture IDs for the textures the decoder will use for output. 703 // Give the texture IDs for the textures the decoder will use for output.
696 IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffers, 704 IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffers,
697 std::vector<int32_t>, /* Picture buffer ID */ 705 std::vector<int32_t>, /* Picture buffer ID */
698 std::vector<uint32_t>) /* Texture ID */ 706 std::vector<uint32_t>) /* Texture ID */
699 707
700 // Send from Renderer process to the GPU process to recycle the given picture 708 // Send from Renderer process to the GPU process to recycle the given picture
701 // buffer for further decoding. 709 // buffer for further decoding.
702 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_ReusePictureBuffer, 710 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_ReusePictureBuffer,
703 int32_t) /* Picture buffer ID */ 711 int32_t) /* Picture buffer ID */
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, 761 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
754 uint32_t) /* Error ID */ 762 uint32_t) /* Error ID */
755 763
756 //------------------------------------------------------------------------------ 764 //------------------------------------------------------------------------------
757 // Accelerated Video Encoder Messages 765 // Accelerated Video Encoder Messages
758 // These messages are sent from the Renderer process to GPU process. 766 // These messages are sent from the Renderer process to GPU process.
759 767
760 // Queue a video frame to the encoder to encode. |frame_id| will be returned 768 // Queue a video frame to the encoder to encode. |frame_id| will be returned
761 // by AcceleratedVideoEncoderHostMsg_NotifyInputDone. 769 // by AcceleratedVideoEncoderHostMsg_NotifyInputDone.
762 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderMsg_Encode, 770 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderMsg_Encode,
763 AcceleratedVideoEncoderMsg_Encode_Params) 771 content::VideoEncodeParams)
764 772
765 // Queue a GpuMemoryBuffer backed video frame to the encoder to encode. 773 // Queue a GpuMemoryBuffer backed video frame to the encoder to encode.
766 // |frame_id| will be returned by 774 // |frame_id| will be returned by
767 // AcceleratedVideoEncoderHostMsg_NotifyInputDone. 775 // AcceleratedVideoEncoderHostMsg_NotifyInputDone.
768 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderMsg_Encode2, 776 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderMsg_Encode2,
769 AcceleratedVideoEncoderMsg_Encode_Params2) 777 content::VideoEncodeParams2)
770 778
771 // Queue a buffer to the encoder for use in returning output. |buffer_id| will 779 // Queue a buffer to the encoder for use in returning output. |buffer_id| will
772 // be returned by AcceleratedVideoEncoderHostMsg_BitstreamBufferReady. 780 // be returned by AcceleratedVideoEncoderHostMsg_BitstreamBufferReady.
773 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer, 781 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer,
774 int32_t /* buffer_id */, 782 int32_t /* buffer_id */,
775 base::SharedMemoryHandle /* buffer_handle */, 783 base::SharedMemoryHandle /* buffer_handle */,
776 uint32_t /* buffer_size */) 784 uint32_t /* buffer_size */)
777 785
778 // Request a runtime encoding parameter change. 786 // Request a runtime encoding parameter change.
779 IPC_MESSAGE_ROUTED2(AcceleratedVideoEncoderMsg_RequestEncodingParametersChange, 787 IPC_MESSAGE_ROUTED2(AcceleratedVideoEncoderMsg_RequestEncodingParametersChange,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 820
813 //------------------------------------------------------------------------------ 821 //------------------------------------------------------------------------------
814 // Accelerated JPEG Decoder Messages 822 // Accelerated JPEG Decoder Messages
815 // These messages are sent from the Browser process to GPU process. 823 // These messages are sent from the Browser process to GPU process.
816 824
817 // Decode one JPEG image from shared memory |input_buffer_handle| with size 825 // Decode one JPEG image from shared memory |input_buffer_handle| with size
818 // |input_buffer_size|. The input buffer is associated with |input_buffer_id| 826 // |input_buffer_size|. The input buffer is associated with |input_buffer_id|
819 // and the size of JPEG image is |coded_size|. Decoded I420 frame data will 827 // and the size of JPEG image is |coded_size|. Decoded I420 frame data will
820 // be put onto shared memory associated with |output_video_frame_handle| 828 // be put onto shared memory associated with |output_video_frame_handle|
821 // with size limit |output_buffer_size|. 829 // with size limit |output_buffer_size|.
822 IPC_MESSAGE_ROUTED1(AcceleratedJpegDecoderMsg_Decode, 830 IPC_MESSAGE_ROUTED1(AcceleratedJpegDecoderMsg_Decode, content::JpegDecodeParams)
823 AcceleratedJpegDecoderMsg_Decode_Params)
824 831
825 // Send destroy request to the decoder. 832 // Send destroy request to the decoder.
826 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) 833 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy)
827 834
828 //------------------------------------------------------------------------------ 835 //------------------------------------------------------------------------------
829 // Accelerated JPEG Decoder Host Messages 836 // Accelerated JPEG Decoder Host Messages
830 // These messages are sent from the GPU process to Browser process. 837 // These messages are sent from the GPU process to Browser process.
831 // 838 //
832 // Report decode status. 839 // Report decode status.
833 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, 840 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck,
834 int32_t, /* bitstream_buffer_id */ 841 int32_t, /* bitstream_buffer_id */
835 media::JpegDecodeAccelerator::Error /* error */) 842 media::JpegDecodeAccelerator::Error /* error */)
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_create_command_buffer_config.cc ('k') | content/common/gpu/jpeg_decode_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698