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 19762004: Add multi-process GpuMemoryBuffer framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/shared_memory.h" 11 #include "base/memory/shared_memory.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/common/gpu/gpu_memory_allocation.h" 13 #include "content/common/gpu/gpu_memory_allocation.h"
14 #include "content/common/gpu/gpu_memory_uma_stats.h" 14 #include "content/common/gpu/gpu_memory_uma_stats.h"
15 #include "content/common/gpu/gpu_process_launch_causes.h" 15 #include "content/common/gpu/gpu_process_launch_causes.h"
16 #include "content/common/gpu/gpu_rendering_stats.h" 16 #include "content/common/gpu/gpu_rendering_stats.h"
17 #include "content/public/common/common_param_traits.h" 17 #include "content/public/common/common_param_traits.h"
18 #include "content/public/common/gpu_memory_stats.h" 18 #include "content/public/common/gpu_memory_stats.h"
19 #include "gpu/command_buffer/common/command_buffer.h" 19 #include "gpu/command_buffer/common/command_buffer.h"
20 #include "gpu/command_buffer/common/constants.h" 20 #include "gpu/command_buffer/common/constants.h"
21 #include "gpu/command_buffer/common/mailbox.h" 21 #include "gpu/command_buffer/common/mailbox.h"
22 #include "gpu/config/gpu_info.h" 22 #include "gpu/config/gpu_info.h"
23 #include "gpu/ipc/gpu_command_buffer_traits.h" 23 #include "gpu/ipc/gpu_command_buffer_traits.h"
24 #include "ipc/ipc_channel_handle.h" 24 #include "ipc/ipc_channel_handle.h"
25 #include "ipc/ipc_message_macros.h" 25 #include "ipc/ipc_message_macros.h"
26 #include "media/base/video_frame.h" 26 #include "media/base/video_frame.h"
27 #include "media/video/video_decode_accelerator.h" 27 #include "media/video/video_decode_accelerator.h"
28 #include "media/video/video_encode_accelerator.h" 28 #include "media/video/video_encode_accelerator.h"
29 #include "ui/events/latency_info.h" 29 #include "ui/events/latency_info.h"
30 #include "ui/gfx/gpu_memory_buffer.h"
30 #include "ui/gfx/native_widget_types.h" 31 #include "ui/gfx/native_widget_types.h"
31 #include "ui/gfx/size.h" 32 #include "ui/gfx/size.h"
32 #include "ui/gl/gpu_preference.h" 33 #include "ui/gl/gpu_preference.h"
33 34
34 #if defined(OS_ANDROID) 35 #if defined(OS_ANDROID)
35 #include "content/common/android/surface_texture_peer.h" 36 #include "content/common/android/surface_texture_peer.h"
36 #endif 37 #endif
37 38
38 #define IPC_MESSAGE_START GpuMsgStart 39 #define IPC_MESSAGE_START GpuMsgStart
39 40
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 // Asynchronously process any commands known to the GPU process. This is only 542 // Asynchronously process any commands known to the GPU process. This is only
542 // used in the event that a channel is unscheduled and needs to be flushed 543 // used in the event that a channel is unscheduled and needs to be flushed
543 // again to process any commands issued subsequent to unscheduling. The GPU 544 // again to process any commands issued subsequent to unscheduling. The GPU
544 // process actually sends it (deferred) to itself. 545 // process actually sends it (deferred) to itself.
545 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_Rescheduled) 546 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_Rescheduled)
546 547
547 // Sent by the GPU process to display messages in the console. 548 // Sent by the GPU process to display messages in the console.
548 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ConsoleMsg, 549 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ConsoleMsg,
549 GPUCommandBufferConsoleMessage /* msg */) 550 GPUCommandBufferConsoleMessage /* msg */)
550 551
551 // Register an existing shared memory transfer buffer. Returns an id that can be 552 // Register an existing shared memory transfer buffer. The id that can be
552 // used to identify the transfer buffer from a command buffer. 553 // used to identify the transfer buffer from a command buffer.
553 IPC_MESSAGE_ROUTED3(GpuCommandBufferMsg_RegisterTransferBuffer, 554 IPC_MESSAGE_ROUTED3(GpuCommandBufferMsg_RegisterTransferBuffer,
554 int32 /* id */, 555 int32 /* id */,
555 base::SharedMemoryHandle /* transfer_buffer */, 556 base::SharedMemoryHandle /* transfer_buffer */,
556 uint32 /* size */) 557 uint32 /* size */)
557 558
558 // Destroy a previously created transfer buffer. 559 // Destroy a previously created transfer buffer.
559 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyTransferBuffer, 560 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyTransferBuffer,
560 int32 /* id */) 561 int32 /* id */)
561 562
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SignalSyncPointAck, 631 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SignalSyncPointAck,
631 uint32 /* signal_id */) 632 uint32 /* signal_id */)
632 633
633 // Makes this command buffer signal when a query is reached, by sending 634 // Makes this command buffer signal when a query is reached, by sending
634 // back a GpuCommandBufferMsg_SignalSyncPointAck message with the same 635 // back a GpuCommandBufferMsg_SignalSyncPointAck message with the same
635 // signal_id. 636 // signal_id.
636 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_SignalQuery, 637 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_SignalQuery,
637 uint32 /* query */, 638 uint32 /* query */,
638 uint32 /* signal_id */) 639 uint32 /* signal_id */)
639 640
641 // Register an existing gpu memory buffer. The id that can be
642 // used to identify the gpu memory buffer from a command buffer.
643 IPC_MESSAGE_ROUTED5(GpuCommandBufferMsg_RegisterGpuMemoryBuffer,
644 int32 /* id */,
645 gfx::GpuMemoryBufferHandle /* gpu_memory_buffer */,
646 uint32 /* width */,
647 uint32 /* height */,
648 uint32 /* internalformat */)
649
650 // Destroy a previously created gpu memory buffer.
651 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyGpuMemoryBuffer,
652 int32 /* id */)
653
640 //------------------------------------------------------------------------------ 654 //------------------------------------------------------------------------------
641 // Accelerated Video Decoder Messages 655 // Accelerated Video Decoder Messages
642 // These messages are sent from Renderer process to GPU process. 656 // These messages are sent from Renderer process to GPU process.
643 657
644 // Send input buffer for decoding. 658 // Send input buffer for decoding.
645 IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_Decode, 659 IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_Decode,
646 base::SharedMemoryHandle, /* input_buffer_handle */ 660 base::SharedMemoryHandle, /* input_buffer_handle */
647 int32, /* bitstream_buffer_id */ 661 int32, /* bitstream_buffer_id */
648 uint32) /* size */ 662 uint32) /* size */
649 663
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 771
758 // Notify the renderer that an output buffer has been filled with encoded data. 772 // Notify the renderer that an output buffer has been filled with encoded data.
759 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady, 773 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady,
760 int32 /* bitstream_buffer_id */, 774 int32 /* bitstream_buffer_id */,
761 uint32 /* payload_size */, 775 uint32 /* payload_size */,
762 bool /* key_frame */) 776 bool /* key_frame */)
763 777
764 // Report error condition. 778 // Report error condition.
765 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError, 779 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError,
766 media::VideoEncodeAccelerator::Error /* error */) 780 media::VideoEncodeAccelerator::Error /* error */)
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698