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 gfx.mojom; | 5 module gfx.mojom; |
6 | 6 |
7 // gfx::BufferFormat | 7 // gfx::BufferFormat |
8 enum BufferFormat { | 8 enum BufferFormat { |
9 ATC, | 9 ATC, |
10 ATCIA, | 10 ATCIA, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 IO_SURFACE_BUFFER, | 42 IO_SURFACE_BUFFER, |
43 SURFACE_TEXTURE_BUFFER, | 43 SURFACE_TEXTURE_BUFFER, |
44 OZONE_NATIVE_PIXMAP, | 44 OZONE_NATIVE_PIXMAP, |
45 LAST = OZONE_NATIVE_PIXMAP | 45 LAST = OZONE_NATIVE_PIXMAP |
46 }; | 46 }; |
47 | 47 |
48 // gfx::GpuMemoryBufferId | 48 // gfx::GpuMemoryBufferId |
49 struct GpuMemoryBufferId { | 49 struct GpuMemoryBufferId { |
50 int32 id; | 50 int32 id; |
51 }; | 51 }; |
| 52 |
| 53 // gfx::NativePixmapPlane |
| 54 struct NativePixmapPlane { |
| 55 uint32 stride; |
| 56 int32 offset; |
| 57 uint64 modifier; |
| 58 }; |
| 59 |
| 60 // gfx::NativePixmapHandle |
| 61 struct NativePixmapHandle { |
| 62 // A file descriptor for the underlying memory object (usually dmabuf). |
| 63 array<handle> fds; |
| 64 |
| 65 array<NativePixmapPlane> planes; |
| 66 }; |
| 67 |
| 68 // gfx::GpuMemoryBufferHandle |
| 69 struct GpuMemoryBufferHandle { |
| 70 GpuMemoryBufferType type; |
| 71 GpuMemoryBufferId id; |
| 72 handle shared_memory_handle; |
| 73 uint32 offset; |
| 74 uint32 stride; |
| 75 NativePixmapHandle? native_pixmap_handle; |
| 76 // TODO: Add support for mach_port on mac. |
| 77 }; |
OLD | NEW |