fidl_data_zbi/
graphics.rs

1// Copyright 2022 The Fuchsia 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// DO NOT EDIT.
6// Generated from FIDL library `zbi` by zither, a Fuchsia platform tool.
7
8#![allow(unused_imports)]
9
10use zerocopy::IntoBytes;
11
12/// Gives a pixel format representation.
13///
14/// Bits [23:16] (i.e., the third byte) encode the number of bytes per pixel
15/// in the representation.
16#[repr(u32)]
17#[derive(Clone, Copy, Debug, Eq, IntoBytes, PartialEq)]
18pub enum PixelFormat {
19    None = 0x00000000,
20    Rgb565 = 0x00020001,
21    Rgb332 = 0x00010002,
22    Rgb2220 = 0x00010003,
23    Argb8888 = 0x00040004,
24    RgbX888 = 0x00040005,
25    Mono8 = 0x00010007,
26    Nv12 = 0x00010008,
27    I420 = 0x00010009,
28    Rgb888 = 0x00030009,
29    Abgr8888 = 0x0004000a,
30    Bgr888X = 0x0004000b,
31    Argb2101010 = 0x0004000c,
32    Abgr2101010 = 0x0004000d,
33}
34
35/// ZBI_TYPE_FRAMEBUFFER payload.
36#[repr(C)]
37#[derive(Clone, Copy, Debug, Eq, IntoBytes, PartialEq)]
38pub struct Swfb {
39    /// Physical memory address.
40    pub base: u64,
41
42    /// Pixel layout and format.
43    pub width: u32,
44    pub height: u32,
45    pub stride: u32,
46    pub format: PixelFormat,
47}