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