| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module mus.mojom; | |
| 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 { | |
| 34 EMPTY, | |
| 35 SHARED_MEMORY, | |
| 36 IO_SURFACE, | |
| 37 SURFACE_TEXTURE, | |
| 38 OZONE_NATIVE_PIXMAP, | |
| 39 LAST = OZONE_NATIVE_PIXMAP | |
| 40 }; | |
| 41 | |
| 42 struct GpuMemoryBufferId { | |
| 43 int32 id; | |
| 44 }; | |
| 45 | |
| 46 struct NativePixmapHandle { | |
| 47 // A file descriptor for the underlying memory object (usually dmabuf). | |
| 48 handle fd; | |
| 49 | |
| 50 // The stride used when accessing the buffer via a memory mapping. | |
| 51 int32 stride; | |
| 52 }; | |
| 53 | |
| 54 | |
| 55 struct GpuMemoryBufferHandle { | |
| 56 GpuMemoryBufferType type; | |
| 57 GpuMemoryBufferId id; | |
| 58 handle buffer_handle; | |
| 59 uint32 offset; | |
| 60 int32 stride; | |
| 61 NativePixmapHandle? native_pixmap_handle; | |
| 62 // TODO(fsamuel): Add support for Machports. | |
| 63 }; | |
| OLD | NEW |