| // Copyright 2023 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library zbi; |
| |
| // TODO(https://fxbug.dev/42062786): Figure out documentation convention. |
| |
| /// Gives a pixel format representation. |
| /// |
| /// Bits [23:16] (i.e., the third byte) encode the number of bytes per pixel |
| /// in the representation. |
| type PixelFormat = flexible enum : uint32 { |
| NONE = 0x00000000; |
| RGB_565 = 0x00020001; |
| RGB_332 = 0x00010002; |
| RGB_2220 = 0x00010003; |
| ARGB_8888 = 0x00040004; |
| RGB_X888 = 0x00040005; |
| MONO_8 = 0x00010007; |
| NV12 = 0x00010008; |
| I420 = 0x00010009; |
| RGB_888 = 0x00030009; |
| ABGR_8888 = 0x0004000a; |
| BGR_888X = 0x0004000b; |
| ARGB_2_10_10_10 = 0x0004000c; |
| ABGR_2_10_10_10 = 0x0004000d; |
| }; |
| |
| /// ZBI_TYPE_FRAMEBUFFER payload. |
| type Swfb = struct { |
| /// Physical memory address. |
| base uint64; |
| |
| /// Pixel layout and format. |
| width uint32; |
| height uint32; |
| stride uint32; |
| format PixelFormat; |
| }; |