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

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

Issue 7205012: RendererGLContext supports reparenting a GL context. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 8
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "content/common/common_param_traits.h" 10 #include "content/common/common_param_traits.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // These are messages from a renderer process to the GPU process. 224 // These are messages from a renderer process to the GPU process.
225 225
226 // Initialize a channel between a renderer process and a GPU process. The 226 // Initialize a channel between a renderer process and a GPU process. The
227 // renderer passes its process handle to the GPU process, which gives gives the 227 // renderer passes its process handle to the GPU process, which gives gives the
228 // GPU process the ability to map handles from the renderer process. This must 228 // GPU process the ability to map handles from the renderer process. This must
229 // be the first message sent on a newly connected channel. 229 // be the first message sent on a newly connected channel.
230 IPC_MESSAGE_CONTROL1(GpuChannelMsg_Initialize, 230 IPC_MESSAGE_CONTROL1(GpuChannelMsg_Initialize,
231 base::ProcessHandle /* renderer_process_for_gpu */) 231 base::ProcessHandle /* renderer_process_for_gpu */)
232 232
233 // Tells the GPU process to create a new command buffer that renders to an 233 // Tells the GPU process to create a new command buffer that renders to an
234 // offscreen frame buffer. If parent_route_id is not zero, the texture backing 234 // offscreen frame buffer.
235 // the frame buffer is mapped into the corresponding parent command buffer's 235 IPC_SYNC_MESSAGE_CONTROL2_1(GpuChannelMsg_CreateOffscreenCommandBuffer,
236 // namespace, with the name of parent_texture_id. This ID is in the parent's
237 // namespace.
238 IPC_SYNC_MESSAGE_CONTROL4_1(GpuChannelMsg_CreateOffscreenCommandBuffer,
239 int32, /* parent_route_id */
240 gfx::Size, /* size */ 236 gfx::Size, /* size */
241 GPUCreateCommandBufferConfig, /* init_params */ 237 GPUCreateCommandBufferConfig, /* init_params */
242 uint32, /* parent_texture_id */
243 int32 /* route_id */) 238 int32 /* route_id */)
244 239
245 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its 240 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its
246 // destructor, so that the stub deletes the actual CommandBufferService 241 // destructor, so that the stub deletes the actual CommandBufferService
247 // object that it's hosting. 242 // object that it's hosting.
248 // TODO(apatrick): Implement this. 243 // TODO(apatrick): Implement this.
249 IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyCommandBuffer, 244 IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyCommandBuffer,
250 int32 /* instance_id */) 245 int32 /* instance_id */)
251 246
252 // Create a surface for offscreen rendering. 247 // Create a surface for offscreen rendering.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 // These are messages between a renderer process to the GPU process relating to 284 // These are messages between a renderer process to the GPU process relating to
290 // a single OpenGL context. 285 // a single OpenGL context.
291 // Initialize a command buffer with the given number of command entries. 286 // Initialize a command buffer with the given number of command entries.
292 // Returns the shared memory handle for the command buffer mapped to the 287 // Returns the shared memory handle for the command buffer mapped to the
293 // calling process. 288 // calling process.
294 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_Initialize, 289 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_Initialize,
295 base::SharedMemoryHandle /* ring_buffer */, 290 base::SharedMemoryHandle /* ring_buffer */,
296 int32 /* size */, 291 int32 /* size */,
297 bool /* result */) 292 bool /* result */)
298 293
294 // Sets the parent command buffer. This allows the parent and child to share
295 // textures.
296 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_SetParent,
297 int32 /* parent_route_id */,
298 uint32 /* parent_texture_id */,
299 bool /* result */)
300
299 // Get the current state of the command buffer. 301 // Get the current state of the command buffer.
300 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetState, 302 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetState,
301 gpu::CommandBuffer::State /* state */) 303 gpu::CommandBuffer::State /* state */)
302 304
303 // Synchronize the put and get offsets of both processes. Caller passes its 305 // Synchronize the put and get offsets of both processes. Caller passes its
304 // current put offset. Current state (including get offset) is returned. 306 // current put offset. Current state (including get offset) is returned.
305 IPC_SYNC_MESSAGE_ROUTED3_1(GpuCommandBufferMsg_Flush, 307 IPC_SYNC_MESSAGE_ROUTED3_1(GpuCommandBufferMsg_Flush,
306 int32 /* put_offset */, 308 int32 /* put_offset */,
307 int32 /* last_known_get */, 309 int32 /* last_known_get */,
308 uint32 /* flush_count */, 310 uint32 /* flush_count */,
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 491
490 // Confirm decoder has been aborted. 492 // Confirm decoder has been aborted.
491 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_AbortDone) 493 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_AbortDone)
492 494
493 // Decoder has faced end of stream marker in the stream. 495 // Decoder has faced end of stream marker in the stream.
494 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) 496 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream)
495 497
496 // Video decoder has encountered an error. 498 // Video decoder has encountered an error.
497 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, 499 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
498 uint32) /* Error ID */ 500 uint32) /* Error ID */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698