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