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

Unified Diff: content/common/mac/io_surface_manager_messages.h

Issue 1137453002: content: Pass IOSurface references using Mach IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment Created 5 years, 7 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/mac/io_surface_manager_messages.h
diff --git a/content/common/mac/io_surface_manager_messages.h b/content/common/mac/io_surface_manager_messages.h
new file mode 100644
index 0000000000000000000000000000000000000000..8b377c3ed5499ea9d85675cef26022b1c586c710
--- /dev/null
+++ b/content/common/mac/io_surface_manager_messages.h
@@ -0,0 +1,54 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_
+#define CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_
+
+// Mach IPC messages used for child processes.
+
+// Message IDs.
+// Note: we currently use __LINE__ to give unique IDs to messages.
+// They're unique since all messages are defined in this file.
+#define MACH_MESSAGE_ID() __LINE__
+
+namespace content {
+
+// Messages sent from the child process to the browser.
+
+struct IOSurfaceManagerHostMsg_RegisterIOSurface {
Robert Sesek 2015/05/15 21:45:05 Each of these messages should have the mach_msg_h
reveman 2015/05/18 18:15:39 Done but gpu::Mailbox here gets ugly as it's not P
+ enum { ID = MACH_MESSAGE_ID() };
+ mach_msg_port_descriptor_t io_surface_port;
+ int io_surface_id;
+ int client_id;
+};
+
+struct IOSurfaceManagerHostMsg_RegisterIOSurfaceReply {
+ enum { ID = MACH_MESSAGE_ID() };
+ boolean_t result;
+};
+
+struct IOSurfaceManagerHostMsg_UnregisterIOSurface {
+ enum { ID = MACH_MESSAGE_ID() };
+ int io_surface_id;
+ int client_id;
+};
+
+struct IOSurfaceManagerHostMsg_AcquireIOSurface {
+ enum { ID = MACH_MESSAGE_ID() };
+ int io_surface_id;
+};
+
+// Messages sent from the browser to the child process.
+
+struct IOSurfaceManagerMsg_RegisterIOSurfaceReply {
+ boolean_t result;
+};
+
+struct IOSurfaceManagerMsg_AcquireIOSurfaceReply {
+ mach_msg_port_descriptor_t io_surface_port;
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_

Powered by Google App Engine
This is Rietveld 408576698