Chromium Code Reviews| 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 int32 stride; | |
|
Tom Sepez
2016/08/31 16:52:36
Can these be negative? Would an unsigned type be
spang
2016/08/31 19:35:57
Please don't do that.
https://engdoc.corp.google.
sadrul
2016/08/31 19:53:19
Doing this separately in https://codereview.chromi
rjkroege
2016/08/31 19:54:14
Also, I recall that for some overlay plane types,
| |
| 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; | |
|
Tom Sepez
2016/08/31 17:04:15
Anyways, where do we check upon de-serialization t
sadrul
2016/08/31 17:13:19
It doesn't look like we actually check that anywhe
rjkroege
2016/08/31 19:54:14
On CrOS, these values end up here: https://cs.chro
sadrul
2016/08/31 20:01:28
|size| doesn't come at the same time as the stride
| |
| 66 }; | |
| 67 | |
| 68 // gfx::GpuMemoryBufferHandle | |
| 69 struct GpuMemoryBufferHandle { | |
| 70 GpuMemoryBufferType type; | |
| 71 GpuMemoryBufferId id; | |
| 72 handle shared_memory_handle; | |
| 73 uint32 offset; | |
| 74 int32 stride; | |
|
Tom Sepez
2016/08/31 16:52:36
nit: same here.
| |
| 75 NativePixmapHandle? native_pixmap_handle; | |
| 76 // TODO: Add support for mach_port on mac. | |
| 77 }; | |
| OLD | NEW |