| 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/memory_stats.mojom"; | 8 import "gpu/ipc/common/memory_stats.mojom"; |
| 9 import "gpu/ipc/common/surface_handle.mojom"; | 9 import "gpu/ipc/common/surface_handle.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 import "ui/gfx/mojo/buffer_types.mojom"; | 12 import "ui/gfx/mojo/buffer_types.mojom"; |
| 13 | 13 |
| 14 interface GpuService { | 14 interface GpuService { |
| 15 // 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 |
| 16 // client. The GPU service responds with an IPC handle. | 16 // client. The GPU service responds with an IPC handle. |
| 17 EstablishGpuChannel(int32 client_id, | 17 EstablishGpuChannel(int32 client_id, |
| 18 uint64 client_tracing_id, | 18 uint64 client_tracing_id, |
| 19 bool is_gpu_host) | 19 bool is_gpu_host) |
| 20 => (handle<message_pipe>? channel_handle); | 20 => (handle<message_pipe>? channel_handle); |
| 21 | 21 |
| 22 // Tells the GPU process to close the channel identified by |client_id|. | 22 // Tells the GPU process to close the channel identified by |client_id|. |
| 23 // If no channel can be identified, do nothing. | 23 // If no channel can be identified, do nothing. |
| 24 CloseChannel(int32 client_id); | 24 CloseChannel(int32 client_id); |
| 25 | 25 |
| 26 [Sync] | |
| 27 CreateGpuMemoryBuffer(gfx.mojom.GpuMemoryBufferId id, | 26 CreateGpuMemoryBuffer(gfx.mojom.GpuMemoryBufferId id, |
| 28 gfx.mojom.Size size, | 27 gfx.mojom.Size size, |
| 29 gfx.mojom.BufferFormat format, | 28 gfx.mojom.BufferFormat format, |
| 30 gfx.mojom.BufferUsage usage, | 29 gfx.mojom.BufferUsage usage, |
| 31 int32 client_id, | 30 int32 client_id, |
| 32 gpu.mojom.SurfaceHandle surface_handle) | 31 gpu.mojom.SurfaceHandle surface_handle) |
| 33 => (gfx.mojom.GpuMemoryBufferHandle buffer_handle); | 32 => (gfx.mojom.GpuMemoryBufferHandle buffer_handle); |
| 34 | 33 |
| 35 DestroyGpuMemoryBuffer(gfx.mojom.GpuMemoryBufferId id, | 34 DestroyGpuMemoryBuffer(gfx.mojom.GpuMemoryBufferId id, |
| 36 int32 client_id, | 35 int32 client_id, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 53 // is reconfigured, for example. | 52 // is reconfigured, for example. |
| 54 GpuSwitched(); | 53 GpuSwitched(); |
| 55 | 54 |
| 56 DestroyAllChannels(); | 55 DestroyAllChannels(); |
| 57 | 56 |
| 58 Crash(); | 57 Crash(); |
| 59 Hang(); | 58 Hang(); |
| 60 ThrowJavaException(); | 59 ThrowJavaException(); |
| 61 Stop() => (); | 60 Stop() => (); |
| 62 }; | 61 }; |
| OLD | NEW |