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

Side by Side Diff: components/mus/public/interfaces/gpu_service.mojom

Issue 1976703003: Impl mus::mojom::GpuService to enable using Chrome IPC version gpu CmdBuf in mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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 asynchronously with IPC handle and
16 // GPUInfo. 16 // GPUInfo.
17 EstablishGpuChannel(bool prempts, 17 EstablishGpuChannel()
18 bool allow_view_command_buffers, 18 => (int32 client_id, ChannelHandle channel_handle, GpuInfo? gpu_info);
Tom Sepez 2016/06/03 17:11:11 How does it know that its less trustworthy client
dcheng 2016/06/03 17:34:48 Is GpuInfo nullable only because it's not yet impl
Peng 2016/06/03 18:34:07 Yes. I changed it to nullbale because we don't hav
Peng 2016/06/03 18:34:07 With chrome IPC command buffer, the client_id is u
piman 2016/06/03 19:20:46 The sync token is meant to indicate a particular p
19 bool allow_real_time_streams)
20 => (ChannelHandle channel_handle, GpuInfo gpu_info);
21 19
22 // Tells the GPU service to create a new GPU memory buffer. 20 // Tells the GPU service to create a new GPU memory buffer.
23 CreateGpuMemoryBuffer(GpuMemoryBufferId id, 21 CreateGpuMemoryBuffer(GpuMemoryBufferId id,
24 gfx.mojom.Size size, 22 gfx.mojom.Size size,
25 BufferFormat format, 23 BufferFormat format,
26 BufferUsage usage, 24 BufferUsage usage,
27 uint64 surface_id) 25 uint64 surface_id)
28 => (GpuMemoryBufferHandle buffer_handle); 26 => (GpuMemoryBufferHandle buffer_handle);
29 27
30 // Tells the GPU service to create a new GPU memory buffer from an existing 28 // Tells the GPU service to create a new GPU memory buffer from an existing
31 // handle. 29 // handle.
32 CreateGpuMemoryBufferFromHandle( 30 CreateGpuMemoryBufferFromHandle(
33 GpuMemoryBufferHandle buffer_handle, 31 GpuMemoryBufferHandle buffer_handle,
34 GpuMemoryBufferId id, 32 GpuMemoryBufferId id,
35 gfx.mojom.Size size, 33 gfx.mojom.Size size,
36 BufferFormat format) => (GpuMemoryBufferHandle buffer_handle); 34 BufferFormat format) => (GpuMemoryBufferHandle buffer_handle);
37 35
38 // Tells the GPU process to destroy GPU memory buffer. 36 // Tells the GPU process to destroy GPU memory buffer.
39 DestroyGpuMemoryBuffer(GpuMemoryBufferId id, 37 DestroyGpuMemoryBuffer(GpuMemoryBufferId id,
40 gpu.mojom.SyncToken sync_token); 38 gpu.mojom.SyncToken sync_token);
41 }; 39 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698