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

Side by Side Diff: chrome/common/gpu_messages_internal.h

Issue 6557006: Moved creation of GPU transfer buffers into the browser process.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include <vector> 5 #include <vector>
6 #include <string> 6 #include <string>
7 7
8 #include "base/shared_memory.h" 8 #include "base/shared_memory.h"
9 #include "chrome/common/gpu_info.h" 9 #include "chrome/common/gpu_info.h"
10 #include "chrome/common/gpu_video_common.h" 10 #include "chrome/common/gpu_video_common.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 #elif defined(OS_WIN) 172 #elif defined(OS_WIN)
173 IPC_MESSAGE_CONTROL2(GpuHostMsg_ScheduleComposite, 173 IPC_MESSAGE_CONTROL2(GpuHostMsg_ScheduleComposite,
174 int32, /* renderer_id */ 174 int32, /* renderer_id */
175 int32 /* render_view_id */) 175 int32 /* render_view_id */)
176 #endif 176 #endif
177 177
178 //------------------------------------------------------------------------------ 178 //------------------------------------------------------------------------------
179 // GPU Channel Messages 179 // GPU Channel Messages
180 // These are messages from a renderer process to the GPU process. 180 // These are messages from a renderer process to the GPU process.
181 181
182 // Initialize a channel between a renderer process and a GPU process. The
183 // renderer passes a process handle to the GPU process, which gives it the
Ken Russell (switch to Gerrit) 2011/02/24 19:48:47 I found this really confusing to understand. I thi
184 // ability to map renderer handles into the GPU process. This must be the
185 // first message sent on a newly connected channel.
186 IPC_MESSAGE_CONTROL1(GpuChannelMsg_Initialize,
187 base::ProcessHandle /* gpu_renderer_process */)
Ken Russell (switch to Gerrit) 2011/02/24 19:48:47 I found the naming convention of "gpu_renderer_pro
188
182 // Tells the GPU process to create a new command buffer that renders to an 189 // Tells the GPU process to create a new command buffer that renders to an
183 // offscreen frame buffer. If parent_route_id is not zero, the texture backing 190 // offscreen frame buffer. If parent_route_id is not zero, the texture backing
184 // the frame buffer is mapped into the corresponding parent command buffer's 191 // the frame buffer is mapped into the corresponding parent command buffer's
185 // namespace, with the name of parent_texture_id. This ID is in the parent's 192 // namespace, with the name of parent_texture_id. This ID is in the parent's
186 // namespace. 193 // namespace.
187 IPC_SYNC_MESSAGE_CONTROL4_1(GpuChannelMsg_CreateOffscreenCommandBuffer, 194 IPC_SYNC_MESSAGE_CONTROL4_1(GpuChannelMsg_CreateOffscreenCommandBuffer,
188 int32, /* parent_route_id */ 195 int32, /* parent_route_id */
189 gfx::Size, /* size */ 196 gfx::Size, /* size */
190 GPUCreateCommandBufferConfig, /* init_params */ 197 GPUCreateCommandBufferConfig, /* init_params */
191 uint32, /* parent_texture_id */ 198 uint32, /* parent_texture_id */
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 257
251 // Indicates that a SwapBuffers call has been issued. 258 // Indicates that a SwapBuffers call has been issued.
252 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_SwapBuffers) 259 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_SwapBuffers)
253 260
254 // Create a shared memory transfer buffer. Returns an id that can be used to 261 // Create a shared memory transfer buffer. Returns an id that can be used to
255 // identify the transfer buffer from a comment. 262 // identify the transfer buffer from a comment.
256 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateTransferBuffer, 263 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateTransferBuffer,
257 int32 /* size */, 264 int32 /* size */,
258 int32 /* id */) 265 int32 /* id */)
259 266
267 // Register an existing shared memory transfer buffer. Returns an id that can be
268 // used to identify the transfer buffer from a command buffer.
269 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_RegisterTransferBuffer,
270 base::SharedMemoryHandle /* transfer_buffer */,
271 size_t /* size */,
272 int32 /* id */)
273
260 // Destroy a previously created transfer buffer. 274 // Destroy a previously created transfer buffer.
261 IPC_SYNC_MESSAGE_ROUTED1_0(GpuCommandBufferMsg_DestroyTransferBuffer, 275 IPC_SYNC_MESSAGE_ROUTED1_0(GpuCommandBufferMsg_DestroyTransferBuffer,
262 int32 /* id */) 276 int32 /* id */)
263 277
264 // Get the shared memory handle for a transfer buffer mapped to the callers 278 // Get the shared memory handle for a transfer buffer mapped to the callers
265 // process. 279 // process.
266 IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer, 280 IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer,
267 int32 /* id */, 281 int32 /* id */,
268 base::SharedMemoryHandle /* transfer_buffer */, 282 base::SharedMemoryHandle /* transfer_buffer */,
269 uint32 /* size */) 283 uint32 /* size */)
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 // Release all video frames allocated for a hardware video decoder. 377 // Release all video frames allocated for a hardware video decoder.
364 IPC_MESSAGE_ROUTED0(GpuVideoDecoderHostMsg_ReleaseAllVideoFrames) 378 IPC_MESSAGE_ROUTED0(GpuVideoDecoderHostMsg_ReleaseAllVideoFrames)
365 379
366 // GpuVideoDecoder report output format change. 380 // GpuVideoDecoder report output format change.
367 IPC_MESSAGE_ROUTED1(GpuVideoDecoderHostMsg_MediaFormatChange, 381 IPC_MESSAGE_ROUTED1(GpuVideoDecoderHostMsg_MediaFormatChange,
368 GpuVideoDecoderFormatChangeParam) 382 GpuVideoDecoderFormatChangeParam)
369 383
370 // GpuVideoDecoder report error. 384 // GpuVideoDecoder report error.
371 IPC_MESSAGE_ROUTED1(GpuVideoDecoderHostMsg_ErrorNotification, 385 IPC_MESSAGE_ROUTED1(GpuVideoDecoderHostMsg_ErrorNotification,
372 GpuVideoDecoderErrorInfoParam) 386 GpuVideoDecoderErrorInfoParam)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698