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

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

Issue 22935009: Add content::SurfaceCapturer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screencast_stride
Patch Set: a1372c98 Rebase for commit. Created 7 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
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/common/gpu/surface_capturer.h"
17 #include "content/public/common/common_param_traits.h" 18 #include "content/public/common/common_param_traits.h"
18 #include "content/public/common/gpu_memory_stats.h" 19 #include "content/public/common/gpu_memory_stats.h"
19 #include "gpu/command_buffer/common/command_buffer.h" 20 #include "gpu/command_buffer/common/command_buffer.h"
20 #include "gpu/command_buffer/common/constants.h" 21 #include "gpu/command_buffer/common/constants.h"
21 #include "gpu/command_buffer/common/mailbox.h" 22 #include "gpu/command_buffer/common/mailbox.h"
22 #include "gpu/config/gpu_info.h" 23 #include "gpu/config/gpu_info.h"
23 #include "gpu/ipc/gpu_command_buffer_traits.h" 24 #include "gpu/ipc/gpu_command_buffer_traits.h"
24 #include "ipc/ipc_channel_handle.h" 25 #include "ipc/ipc_channel_handle.h"
25 #include "ipc/ipc_message_macros.h" 26 #include "ipc/ipc_message_macros.h"
26 #include "media/base/video_frame.h" 27 #include "media/base/video_frame.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 IPC_STRUCT_TRAITS_MEMBER(texture_upload_count) 217 IPC_STRUCT_TRAITS_MEMBER(texture_upload_count)
217 IPC_STRUCT_TRAITS_MEMBER(total_texture_upload_time) 218 IPC_STRUCT_TRAITS_MEMBER(total_texture_upload_time)
218 IPC_STRUCT_TRAITS_MEMBER(global_total_processing_commands_time) 219 IPC_STRUCT_TRAITS_MEMBER(global_total_processing_commands_time)
219 IPC_STRUCT_TRAITS_MEMBER(total_processing_commands_time) 220 IPC_STRUCT_TRAITS_MEMBER(total_processing_commands_time)
220 IPC_STRUCT_TRAITS_END() 221 IPC_STRUCT_TRAITS_END()
221 222
222 IPC_ENUM_TRAITS(media::VideoFrame::Format) 223 IPC_ENUM_TRAITS(media::VideoFrame::Format)
223 224
224 IPC_ENUM_TRAITS(media::VideoEncodeAccelerator::Error) 225 IPC_ENUM_TRAITS(media::VideoEncodeAccelerator::Error)
225 226
227 IPC_ENUM_TRAITS(content::SurfaceCapturer::Error)
228
226 //------------------------------------------------------------------------------ 229 //------------------------------------------------------------------------------
227 // GPU Messages 230 // GPU Messages
228 // These are messages from the browser to the GPU process. 231 // These are messages from the browser to the GPU process.
229 232
230 // Tells the GPU process to initialize itself. The browser explicitly 233 // Tells the GPU process to initialize itself. The browser explicitly
231 // requests this be done so that we are guaranteed that the channel is set 234 // requests this be done so that we are guaranteed that the channel is set
232 // up between the browser and GPU process before doing any work that might 235 // up between the browser and GPU process before doing any work that might
233 // potentially crash the GPU process. Detection of the child process 236 // potentially crash the GPU process. Detection of the child process
234 // exiting abruptly is predicated on having the IPC channel set up. 237 // exiting abruptly is predicated on having the IPC channel set up.
235 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) 238 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize)
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 base::SharedMemoryHandle /* transfer_buffer */, 567 base::SharedMemoryHandle /* transfer_buffer */,
565 uint32 /* size */) 568 uint32 /* size */)
566 569
567 // Create and initialize a hardware video decoder, returning its new route_id. 570 // Create and initialize a hardware video decoder, returning its new route_id.
568 // Created decoders should be freed with AcceleratedVideoDecoderMsg_Destroy when 571 // Created decoders should be freed with AcceleratedVideoDecoderMsg_Destroy when
569 // no longer needed. 572 // no longer needed.
570 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder, 573 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder,
571 media::VideoCodecProfile /* profile */, 574 media::VideoCodecProfile /* profile */,
572 int /* route_id */) 575 int /* route_id */)
573 576
577 // Create and initialize a surface capturer, returning its new route_id.
578 // Created capturers should be freed with SurfaceCapturerMsg_Destroy when no
579 // longer needed.
580 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_CreateSurfaceCapturer,
581 int /* route_id */)
582
574 // Tells the proxy that there was an error and the command buffer had to be 583 // Tells the proxy that there was an error and the command buffer had to be
575 // destroyed for some reason. 584 // destroyed for some reason.
576 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed, 585 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed,
577 gpu::error::ContextLostReason /* reason */) 586 gpu::error::ContextLostReason /* reason */)
578 587
579 // Request that the GPU process reply with the given message. Reply may be 588 // Request that the GPU process reply with the given message. Reply may be
580 // delayed. 589 // delayed.
581 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Echo, 590 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Echo,
582 IPC::Message /* reply */) 591 IPC::Message /* reply */)
583 592
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 765
757 // Notify the renderer that an output buffer has been filled with encoded data. 766 // Notify the renderer that an output buffer has been filled with encoded data.
758 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady, 767 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady,
759 int32 /* bitstream_buffer_id */, 768 int32 /* bitstream_buffer_id */,
760 uint32 /* payload_size */, 769 uint32 /* payload_size */,
761 bool /* key_frame */) 770 bool /* key_frame */)
762 771
763 // Report error condition. 772 // Report error condition.
764 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError, 773 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError,
765 media::VideoEncodeAccelerator::Error /* error */) 774 media::VideoEncodeAccelerator::Error /* error */)
775
776 //------------------------------------------------------------------------------
777 // Gpu Surface Capturer Messages
778 // These messages are sent from the Browser process to the GPU process.
779
780 // Initialize the capturer.
781 IPC_MESSAGE_ROUTED1(SurfaceCapturerMsg_Initialize,
782 media::VideoFrame::Format /* format */)
783
784 // Attempt to start a capture.
785 IPC_MESSAGE_ROUTED0(SurfaceCapturerMsg_TryCapture)
786
787 // Copy captured contents to a video frame.
788 IPC_MESSAGE_ROUTED3(SurfaceCapturerMsg_CopyCaptureToVideoFrame,
789 int32 /* buffer_id */,
790 base::SharedMemoryHandle /* buffer_shm */,
791 uint32 /* buffer_size */)
792
793 // Destroy the capturer.
794 IPC_MESSAGE_ROUTED0(SurfaceCapturerMsg_Destroy)
795
796 //------------------------------------------------------------------------------
797 // Gpu Surface Capturer Host Messages
798 // These messages are sent from GPU process to Browser process.
799
800 // Report the capture output parameters to the Browser process.
801 IPC_MESSAGE_ROUTED2(SurfaceCapturerHostMsg_NotifyCaptureParameters,
802 gfx::Size /* buffer_size */,
803 gfx::Rect /* visible_rect */)
804
805 // Report successful copy of a capture of a surface.
806 IPC_MESSAGE_ROUTED1(SurfaceCapturerHostMsg_NotifyCopyCaptureDone,
807 int32 /* frame_id */)
808
809 // Report error.
810 IPC_MESSAGE_ROUTED1(SurfaceCapturerHostMsg_NotifyError,
811 content::SurfaceCapturer::Error /* error */)
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/common/gpu/media/gl_surface_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698