OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 module ui.mojom; | 5 module ui.mojom; |
6 | 6 |
7 import "gpu/ipc/common/gpu_info.mojom"; | 7 import "gpu/ipc/common/gpu_info.mojom"; |
8 import "gpu/ipc/common/sync_token.mojom"; | 8 import "gpu/ipc/common/sync_token.mojom"; |
9 import "services/ui/public/interfaces/channel_handle.mojom"; | 9 import "services/ui/public/interfaces/channel_handle.mojom"; |
10 import "services/ui/public/interfaces/gpu_memory_buffer.mojom"; | 10 import "services/ui/public/interfaces/gpu_memory_buffer.mojom"; |
11 import "ui/gfx/geometry/mojo/geometry.mojom"; | 11 import "ui/gfx/geometry/mojo/geometry.mojom"; |
| 12 import "ui/gfx/mojo/buffer_types.mojom"; |
12 | 13 |
13 interface GpuService { | 14 interface GpuService { |
14 // Tells the GPU service to create a new channel for communication with a | 15 // Tells the GPU service to create a new channel for communication with a |
15 // client. The GPU service responds with client ID, IPC handle and | 16 // client. The GPU service responds with client ID, IPC handle and |
16 // GPUInfo. | 17 // GPUInfo. |
17 [Sync] | 18 [Sync] |
18 EstablishGpuChannel() => (int32 client_id, | 19 EstablishGpuChannel() => (int32 client_id, |
19 ChannelHandle channel_handle, | 20 ChannelHandle channel_handle, |
20 gpu.mojom.GpuInfo gpu_info); | 21 gpu.mojom.GpuInfo gpu_info); |
21 | 22 |
22 // Tells the GPU service to create a new GPU memory buffer. | 23 // Tells the GPU service to create a new GPU memory buffer. |
23 CreateGpuMemoryBuffer(GpuMemoryBufferId id, | 24 CreateGpuMemoryBuffer(GpuMemoryBufferId id, |
24 gfx.mojom.Size size, | 25 gfx.mojom.Size size, |
25 BufferFormat format, | 26 gfx.mojom.BufferFormat format, |
26 BufferUsage usage, | 27 gfx.mojom.BufferUsage usage, |
27 uint64 surface_id) | 28 uint64 surface_id) |
28 => (GpuMemoryBufferHandle buffer_handle); | 29 => (GpuMemoryBufferHandle buffer_handle); |
29 | 30 |
30 // Tells the GPU process to destroy GPU memory buffer. | 31 // Tells the GPU process to destroy GPU memory buffer. |
31 DestroyGpuMemoryBuffer(GpuMemoryBufferId id, | 32 DestroyGpuMemoryBuffer(GpuMemoryBufferId id, |
32 gpu.mojom.SyncToken sync_token); | 33 gpu.mojom.SyncToken sync_token); |
33 }; | 34 }; |
OLD | NEW |