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

Unified 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: cff149b4 WIP Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/gpu_messages.h
diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
index 49493d9755e1f88f21c5112e97fbff42d7d8f09c..28a2dfcfcf7db8a8a5d227cd24d9b009ba35d0e9 100644
--- a/content/common/gpu/gpu_messages.h
+++ b/content/common/gpu/gpu_messages.h
@@ -14,6 +14,7 @@
#include "content/common/gpu/gpu_memory_uma_stats.h"
#include "content/common/gpu/gpu_process_launch_causes.h"
#include "content/common/gpu/gpu_rendering_stats.h"
+#include "content/common/gpu/surface_capturer.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/gpu_memory_stats.h"
#include "gpu/command_buffer/common/command_buffer.h"
@@ -223,6 +224,8 @@ IPC_ENUM_TRAITS(media::VideoFrame::Format)
IPC_ENUM_TRAITS(media::VideoEncodeAccelerator::Error)
+IPC_ENUM_TRAITS(content::SurfaceCapturer::Error)
+
//------------------------------------------------------------------------------
// GPU Messages
// These are messages from the browser to the GPU process.
@@ -571,6 +574,12 @@ IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder,
media::VideoCodecProfile /* profile */,
int /* route_id */)
+// Create and initialize a surface capturer, returning its new route_id.
+// Created capturers should be freed with SurfaceCapturerMsg_Destroy when no
+// longer needed.
+IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_CreateSurfaceCapturer,
+ int /* route_id */)
+
// Tells the proxy that there was an error and the command buffer had to be
// destroyed for some reason.
IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed,
@@ -763,3 +772,36 @@ IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady,
// Report error condition.
IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError,
media::VideoEncodeAccelerator::Error /* error */)
+
+//------------------------------------------------------------------------------
+// Gpu Surface Capturer Messages
+// These message are sent from the Browser process to the GPU process.
+
+IPC_MESSAGE_ROUTED1(SurfaceCapturerMsg_Initialize,
+ media::VideoFrame::Format /* format */)
+
+// Capture the current contents of the surface, and store in the provided
+// buffer.
+IPC_MESSAGE_ROUTED3(SurfaceCapturerMsg_Capture,
+ int32 /* buffer_id */,
+ base::SharedMemoryHandle /* buffer_shm */,
+ uint32 /* buffer_size */)
+
+IPC_MESSAGE_ROUTED0(SurfaceCapturerMsg_Destroy)
+
+//------------------------------------------------------------------------------
+// Gpu Surface Capturer Host Messages
+// These messages are sent from GPU process to Browser process.
+
+// Report the capture output parameters to the Browser process..
+IPC_MESSAGE_ROUTED2(SurfaceCapturerHostMsg_NotifyCaptureParameters,
+ gfx::Size /* buffer_size */,
+ gfx::Rect /* visible_rect */)
+
+// Report successful capture of a surface.
+IPC_MESSAGE_ROUTED1(SurfaceCapturerHostMsg_NotifyCaptureDone,
+ int32 /* frame_id */)
+
+// Report error.
+IPC_MESSAGE_ROUTED1(SurfaceCapturerHostMsg_NotifyError,
+ content::SurfaceCapturer::Error /* error */)

Powered by Google App Engine
This is Rietveld 408576698