blob: 7bf87301aca10147375dd50e051e0fae4b37bf30 [file] [log] [blame]
// Copyright 2018 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 fuchsia.sysmem;
/// Describes how an image is represented.
///
/// This type is deprecated for new code, but still used by some camera code.
type ImageFormat = struct {
/// Row width in pixels.
width uint32;
/// Number of rows.
height uint32;
/// Number of layers within a multi-layered image.
/// Defaults to 1 if not specified.
@allow_deprecated_struct_defaults
layers uint32 = 1;
/// Pixel format.
@available(added=7, deprecated=23, note="use fuchsia.images2.ImageFormat")
pixel_format PixelFormat;
/// Color space.
@available(added=7, deprecated=23, note="use fuchsia.images2.ImageFormat")
color_space ColorSpace;
@available(added=7, deprecated=23, note="use fuchsia.images2.ImageFormat")
planes array<ImagePlane, 4>;
};
/// This type is deprecated without a direct replacement (intentionally), as
/// fuchsia.images2 doesn't require describing each plane separately.
@available(added=7, deprecated=23, note="use fuchsia.images2.ImageFormat")
type ImagePlane = struct {
/// Byte offset of the start of the plane from the beginning of the image.
byte_offset uint32;
/// Stride in bytes per row.
/// Only meaningful for linear buffer formats.
bytes_per_row uint32;
};
/// Describes constraints for allocating images of some desired form.
@available(added=7, deprecated=23, note="use fuchsia.sysmem2.ImageFormatConstraints")
type ImageSpec = struct {
/// Minimum width in pixels.
min_width uint32;
/// Minimum height in pixels.
min_height uint32;
/// Number of layers within a multi-layered image.
/// Defaults to 1 if not specified.
@allow_deprecated_struct_defaults
layers uint32 = 1;
/// Pixel format.
pixel_format PixelFormat;
/// Color space.
color_space ColorSpace;
};