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

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

Issue 7779001: Replace the use of an int32* with a proper struct for decoder configuration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replaced struct with explicit profile parameter. Created 9 years, 3 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 // 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 <vector> 8 #include <vector>
9 #include <string> 9 #include <string>
10 10
11 #include "base/shared_memory.h" 11 #include "base/shared_memory.h"
12 #include "content/common/common_param_traits.h" 12 #include "content/common/common_param_traits.h"
13 #include "content/common/gpu/gpu_info.h" 13 #include "content/common/gpu/gpu_info.h"
14 #include "content/common/gpu/gpu_process_launch_causes.h" 14 #include "content/common/gpu/gpu_process_launch_causes.h"
15 #include "gpu/command_buffer/common/command_buffer.h" 15 #include "gpu/command_buffer/common/command_buffer.h"
16 #include "gpu/command_buffer/common/constants.h" 16 #include "gpu/command_buffer/common/constants.h"
17 #include "gpu/ipc/gpu_command_buffer_traits.h" 17 #include "gpu/ipc/gpu_command_buffer_traits.h"
18 #include "ipc/ipc_channel_handle.h" 18 #include "ipc/ipc_channel_handle.h"
19 #include "ipc/ipc_message_macros.h" 19 #include "ipc/ipc_message_macros.h"
20 #include "media/video/video_decode_accelerator.h"
20 #include "ui/gfx/native_widget_types.h" 21 #include "ui/gfx/native_widget_types.h"
21 #include "ui/gfx/size.h" 22 #include "ui/gfx/size.h"
22 23
23 #define IPC_MESSAGE_START GpuMsgStart 24 #define IPC_MESSAGE_START GpuMsgStart
24 25
25 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) 26 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig)
26 IPC_STRUCT_MEMBER(int32, share_group_id) 27 IPC_STRUCT_MEMBER(int32, share_group_id)
27 IPC_STRUCT_MEMBER(std::string, allowed_extensions) 28 IPC_STRUCT_MEMBER(std::string, allowed_extensions)
28 IPC_STRUCT_MEMBER(std::vector<int>, attribs) 29 IPC_STRUCT_MEMBER(std::vector<int>, attribs)
29 IPC_STRUCT_MEMBER(GURL, active_url) 30 IPC_STRUCT_MEMBER(GURL, active_url)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 IPC_STRUCT_TRAITS_MEMBER(gl_extensions) 98 IPC_STRUCT_TRAITS_MEMBER(gl_extensions)
98 IPC_STRUCT_TRAITS_MEMBER(can_lose_context) 99 IPC_STRUCT_TRAITS_MEMBER(can_lose_context)
99 #if defined(OS_WIN) 100 #if defined(OS_WIN)
100 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) 101 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics)
101 #endif 102 #endif
102 IPC_STRUCT_TRAITS_END() 103 IPC_STRUCT_TRAITS_END()
103 104
104 IPC_ENUM_TRAITS(content::CauseForGpuLaunch) 105 IPC_ENUM_TRAITS(content::CauseForGpuLaunch)
105 IPC_ENUM_TRAITS(gpu::error::ContextLostReason) 106 IPC_ENUM_TRAITS(gpu::error::ContextLostReason)
106 107
108 IPC_ENUM_TRAITS(media::VideoDecodeAccelerator::Profile)
109
107 //------------------------------------------------------------------------------ 110 //------------------------------------------------------------------------------
108 // GPU Messages 111 // GPU Messages
109 // These are messages from the browser to the GPU process. 112 // These are messages from the browser to the GPU process.
110 113
111 // Tells the GPU process to initialize itself. The browser explicitly 114 // Tells the GPU process to initialize itself. The browser explicitly
112 // requests this be done so that we are guaranteed that the channel is set 115 // requests this be done so that we are guaranteed that the channel is set
113 // up between the browser and GPU process before doing any work that might 116 // up between the browser and GPU process before doing any work that might
114 // potentially crash the GPU process. Detection of the child process 117 // potentially crash the GPU process. Detection of the child process
115 // exiting abruptly is predicated on having the IPC channel set up. 118 // exiting abruptly is predicated on having the IPC channel set up.
116 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) 119 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize)
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 385
383 // Get the shared memory handle for a transfer buffer mapped to the callers 386 // Get the shared memory handle for a transfer buffer mapped to the callers
384 // process. 387 // process.
385 IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer, 388 IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer,
386 int32 /* id */, 389 int32 /* id */,
387 base::SharedMemoryHandle /* transfer_buffer */, 390 base::SharedMemoryHandle /* transfer_buffer */,
388 uint32 /* size */) 391 uint32 /* size */)
389 392
390 // Create and initialize a hardware video decoder, returning its new route_id. 393 // Create and initialize a hardware video decoder, returning its new route_id.
391 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder, 394 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder,
392 std::vector<int32> /* configs */, 395 media::VideoDecodeAccelerator::Profile /* profile */,
393 int /* route_id */) 396 int /* route_id */)
394 397
395 // Release all resources held by the named hardware video decoder. 398 // Release all resources held by the named hardware video decoder.
396 IPC_SYNC_MESSAGE_ROUTED1_0(GpuCommandBufferMsg_DestroyVideoDecoder, 399 IPC_SYNC_MESSAGE_ROUTED1_0(GpuCommandBufferMsg_DestroyVideoDecoder,
397 int /* route_id */) 400 int /* route_id */)
398 401
399 // Send from command buffer stub to proxy when window is invalid and must be 402 // Send from command buffer stub to proxy when window is invalid and must be
400 // repainted. 403 // repainted.
401 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_NotifyRepaint) 404 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_NotifyRepaint)
402 405
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 520
518 // Confirm decoder has been reset. 521 // Confirm decoder has been reset.
519 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) 522 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone)
520 523
521 // Decoder has faced end of stream marker in the stream. 524 // Decoder has faced end of stream marker in the stream.
522 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) 525 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream)
523 526
524 // Video decoder has encountered an error. 527 // Video decoder has encountered an error.
525 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, 528 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
526 uint32) /* Error ID */ 529 uint32) /* Error ID */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698