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 enum BufferFormat { | |
8 ATC, | |
9 ATCIA, | |
10 DXT1, | |
11 DXT5, | |
12 ETC1, | |
13 R_8, | |
14 RGBA_4444, | |
15 RGBX_8888, | |
16 RGBA_8888, | |
17 BGRX_8888, | |
18 BGRA_8888, | |
19 YUV_420, | |
20 YUV_420_BIPLANAR, | |
21 UYVY_422, | |
22 LAST = UYVY_422 | |
23 }; | |
24 | |
25 enum BufferUsage { | |
26 GPU_READ, | |
27 SCANOUT, | |
28 GPU_READ_CPU_READ_WRITE, | |
29 GPU_READ_CPU_READ_WRITE_PERSISTENT, | |
30 LAST = GPU_READ_CPU_READ_WRITE_PERSISTENT | |
31 }; | |
32 | |
33 enum GpuMemoryBufferType { | 7 enum GpuMemoryBufferType { |
34 EMPTY, | 8 EMPTY, |
35 SHARED_MEMORY, | 9 SHARED_MEMORY, |
36 IO_SURFACE, | 10 IO_SURFACE, |
37 SURFACE_TEXTURE, | 11 SURFACE_TEXTURE, |
38 OZONE_NATIVE_PIXMAP, | 12 OZONE_NATIVE_PIXMAP, |
39 LAST = OZONE_NATIVE_PIXMAP | 13 LAST = OZONE_NATIVE_PIXMAP |
40 }; | 14 }; |
41 | 15 |
42 struct GpuMemoryBufferId { | 16 struct GpuMemoryBufferId { |
(...skipping 11 matching lines...) Expand all Loading... |
54 | 28 |
55 struct GpuMemoryBufferHandle { | 29 struct GpuMemoryBufferHandle { |
56 GpuMemoryBufferType type; | 30 GpuMemoryBufferType type; |
57 GpuMemoryBufferId id; | 31 GpuMemoryBufferId id; |
58 handle buffer_handle; | 32 handle buffer_handle; |
59 uint32 offset; | 33 uint32 offset; |
60 int32 stride; | 34 int32 stride; |
61 NativePixmapHandle? native_pixmap_handle; | 35 NativePixmapHandle? native_pixmap_handle; |
62 // TODO(fsamuel): Add support for Machports. | 36 // TODO(fsamuel): Add support for Machports. |
63 }; | 37 }; |
OLD | NEW |