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

Side by Side Diff: services/ui/public/interfaces/gpu_memory_buffer.mojom

Issue 2295923002: gfx: Struct traits for GpuMemoryBufferId and GpuMemoryBufferType. (Closed)
Patch Set: fix build Created 4 years, 3 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 ui.mojom; 5 module ui.mojom;
6 6
7 enum GpuMemoryBufferType { 7 import "ui/gfx/mojo/buffer_types.mojom";
8 EMPTY,
9 SHARED_MEMORY,
10 IO_SURFACE,
11 SURFACE_TEXTURE,
12 OZONE_NATIVE_PIXMAP,
13 LAST = OZONE_NATIVE_PIXMAP
14 };
15
16 struct GpuMemoryBufferId {
17 int32 id;
18 };
19 8
20 struct NativePixmapHandle { 9 struct NativePixmapHandle {
21 // A file descriptor for the underlying memory object (usually dmabuf). 10 // A file descriptor for the underlying memory object (usually dmabuf).
22 handle fd; 11 handle fd;
23 12
24 // The stride used when accessing the buffer via a memory mapping. 13 // The stride used when accessing the buffer via a memory mapping.
25 int32 stride; 14 int32 stride;
26 }; 15 };
27 16
28 17
29 struct GpuMemoryBufferHandle { 18 struct GpuMemoryBufferHandle {
30 GpuMemoryBufferType type; 19 gfx.mojom.GpuMemoryBufferType type;
31 GpuMemoryBufferId id; 20 gfx.mojom.GpuMemoryBufferId id;
32 handle buffer_handle; 21 handle buffer_handle;
33 uint32 offset; 22 uint32 offset;
34 int32 stride; 23 int32 stride;
35 NativePixmapHandle? native_pixmap_handle; 24 NativePixmapHandle? native_pixmap_handle;
36 // TODO(fsamuel): Add support for Machports. 25 // TODO(fsamuel): Add support for Machports.
37 }; 26 };
OLDNEW
« no previous file with comments | « services/ui/gpu/interfaces/gpu_service_internal.mojom ('k') | services/ui/public/interfaces/gpu_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698