Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_ | |
| 6 #define CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_ | |
| 7 | |
| 8 // Mach IPC messages used for child processes. | |
| 9 | |
| 10 // Message IDs. | |
| 11 // Note: we currently use __LINE__ to give unique IDs to messages. | |
| 12 // They're unique since all messages are defined in this file. | |
| 13 #define MACH_MESSAGE_ID() __LINE__ | |
| 14 | |
| 15 namespace content { | |
| 16 | |
| 17 // Messages sent from the child process to the browser. | |
| 18 | |
| 19 struct IOSurfaceManagerHostMsg_RegisterIOSurface { | |
| 20 enum { ID = MACH_MESSAGE_ID() }; | |
| 21 mach_msg_header_t header; | |
| 22 mach_msg_body_t body; | |
| 23 mach_msg_port_descriptor_t io_surface_port; | |
| 24 int8_t mailbox_name[64]; | |
|
Robert Sesek
2015/05/19 23:26:23
Perhaps gpu::Mailbox could expose a public typedef
reveman
2015/05/27 05:03:18
Good idea. Done.
I also added an IOSurfaceManager
| |
| 25 int io_surface_id; | |
| 26 int client_id; | |
| 27 }; | |
| 28 | |
| 29 struct IOSurfaceManagerHostMsg_UnregisterIOSurface { | |
| 30 enum { ID = MACH_MESSAGE_ID() }; | |
| 31 mach_msg_header_t header; | |
| 32 mach_msg_body_t body; | |
| 33 int8_t mailbox_name[64]; | |
| 34 int io_surface_id; | |
| 35 int client_id; | |
| 36 }; | |
| 37 | |
| 38 struct IOSurfaceManagerHostMsg_AcquireIOSurface { | |
| 39 enum { ID = MACH_MESSAGE_ID() }; | |
| 40 mach_msg_header_t header; | |
| 41 mach_msg_body_t body; | |
| 42 int8_t mailbox_name[64]; | |
| 43 int io_surface_id; | |
| 44 }; | |
| 45 | |
| 46 // Messages sent from the browser to the child process. | |
| 47 | |
| 48 struct IOSurfaceManagerMsg_RegisterIOSurfaceReply { | |
| 49 mach_msg_header_t header; | |
| 50 mach_msg_body_t body; | |
| 51 boolean_t result; | |
| 52 }; | |
| 53 | |
| 54 struct IOSurfaceManagerMsg_AcquireIOSurfaceReply { | |
| 55 mach_msg_header_t header; | |
| 56 mach_msg_body_t body; | |
| 57 mach_msg_port_descriptor_t io_surface_port; | |
| 58 }; | |
| 59 | |
| 60 } // namespace content | |
| 61 | |
| 62 #endif // CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_ | |
| OLD | NEW |