#[repr(transparent)]pub struct AHardwareBufferUsageFlags(pub c_ulonglong);
Expand description
Buffer usage flags, specifying how the buffer will be accessed.
Tuple Fields§
§0: c_ulonglong
Implementations§
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const CPU_READ_NEVER: AHardwareBufferUsageFlags
pub const CPU_READ_NEVER: AHardwareBufferUsageFlags
The buffer will never be locked for direct CPU reads using the AHardwareBuffer_lock() function. Note that reading the buffer using OpenGL or Vulkan functions or memory mappings is still allowed.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const CPU_READ_RARELY: AHardwareBufferUsageFlags
pub const CPU_READ_RARELY: AHardwareBufferUsageFlags
The buffer will sometimes be locked for direct CPU reads using the AHardwareBuffer_lock() function. Note that reading the buffer using OpenGL or Vulkan functions or memory mappings does not require the presence of this flag.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const CPU_READ_OFTEN: AHardwareBufferUsageFlags
pub const CPU_READ_OFTEN: AHardwareBufferUsageFlags
The buffer will often be locked for direct CPU reads using the AHardwareBuffer_lock() function. Note that reading the buffer using OpenGL or Vulkan functions or memory mappings does not require the presence of this flag.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const CPU_READ_MASK: AHardwareBufferUsageFlags
pub const CPU_READ_MASK: AHardwareBufferUsageFlags
CPU read value mask.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const CPU_WRITE_NEVER: AHardwareBufferUsageFlags
pub const CPU_WRITE_NEVER: AHardwareBufferUsageFlags
The buffer will never be locked for direct CPU writes using the AHardwareBuffer_lock() function. Note that writing the buffer using OpenGL or Vulkan functions or memory mappings is still allowed.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const CPU_WRITE_RARELY: AHardwareBufferUsageFlags
pub const CPU_WRITE_RARELY: AHardwareBufferUsageFlags
The buffer will sometimes be locked for direct CPU writes using the AHardwareBuffer_lock() function. Note that writing the buffer using OpenGL or Vulkan functions or memory mappings does not require the presence of this flag.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const CPU_WRITE_OFTEN: AHardwareBufferUsageFlags
pub const CPU_WRITE_OFTEN: AHardwareBufferUsageFlags
The buffer will often be locked for direct CPU writes using the AHardwareBuffer_lock() function. Note that writing the buffer using OpenGL or Vulkan functions or memory mappings does not require the presence of this flag.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const CPU_WRITE_MASK: AHardwareBufferUsageFlags
pub const CPU_WRITE_MASK: AHardwareBufferUsageFlags
CPU write value mask.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const GPU_SAMPLED_IMAGE: AHardwareBufferUsageFlags
pub const GPU_SAMPLED_IMAGE: AHardwareBufferUsageFlags
The buffer will be read from by the GPU as a texture.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const GPU_FRAMEBUFFER: AHardwareBufferUsageFlags
pub const GPU_FRAMEBUFFER: AHardwareBufferUsageFlags
The buffer will be written to by the GPU as a framebuffer attachment.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const GPU_COLOR_OUTPUT: AHardwareBufferUsageFlags
pub const GPU_COLOR_OUTPUT: AHardwareBufferUsageFlags
The buffer will be written to by the GPU as a framebuffer attachment.
Note that the name of this flag is somewhat misleading: it does not imply that the buffer contains a color format. A buffer with depth or stencil format that will be used as a framebuffer attachment should also have this flag. Use the equivalent flag AHARDWAREBUFFER_USAGE_GPU_FRAMEBUFFER to avoid this confusion.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const COMPOSER_OVERLAY: AHardwareBufferUsageFlags
pub const COMPOSER_OVERLAY: AHardwareBufferUsageFlags
The buffer will be used as a composer HAL overlay layer.
This flag is currently only needed when using ASurfaceTransaction_setBuffer to set a buffer. In all other cases, the framework adds this flag internally to buffers that could be presented in a composer overlay. ASurfaceTransaction_setBuffer is special because it uses buffers allocated directly through AHardwareBuffer_allocate instead of buffers allocated by the framework.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const PROTECTED_CONTENT: AHardwareBufferUsageFlags
pub const PROTECTED_CONTENT: AHardwareBufferUsageFlags
The buffer is protected from direct CPU access or being read by non-secure hardware, such as video encoders.
This flag is incompatible with CPU read and write flags. It is mainly used when handling DRM video. Refer to the EGL extension EGL_EXT_protected_content and GL extension GL_EXT_protected_textures for more information on how these buffers are expected to behave.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VIDEO_ENCODE: AHardwareBufferUsageFlags
pub const VIDEO_ENCODE: AHardwareBufferUsageFlags
The buffer will be read by a hardware video encoder.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const SENSOR_DIRECT_DATA: AHardwareBufferUsageFlags
pub const SENSOR_DIRECT_DATA: AHardwareBufferUsageFlags
The buffer will be used for direct writes from sensors. When this flag is present, the format must be AHARDWAREBUFFER_FORMAT_BLOB.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const GPU_DATA_BUFFER: AHardwareBufferUsageFlags
pub const GPU_DATA_BUFFER: AHardwareBufferUsageFlags
The buffer will be used as a shader storage or uniform buffer object. When this flag is present, the format must be AHARDWAREBUFFER_FORMAT_BLOB.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const GPU_CUBE_MAP: AHardwareBufferUsageFlags
pub const GPU_CUBE_MAP: AHardwareBufferUsageFlags
The buffer will be used as a cube map texture. When this flag is present, the buffer must have a layer count that is a multiple of 6. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const GPU_MIPMAP_COMPLETE: AHardwareBufferUsageFlags
pub const GPU_MIPMAP_COMPLETE: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_0: AHardwareBufferUsageFlags
pub const VENDOR_0: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_1: AHardwareBufferUsageFlags
pub const VENDOR_1: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_2: AHardwareBufferUsageFlags
pub const VENDOR_2: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_3: AHardwareBufferUsageFlags
pub const VENDOR_3: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_4: AHardwareBufferUsageFlags
pub const VENDOR_4: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_5: AHardwareBufferUsageFlags
pub const VENDOR_5: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_6: AHardwareBufferUsageFlags
pub const VENDOR_6: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_7: AHardwareBufferUsageFlags
pub const VENDOR_7: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_8: AHardwareBufferUsageFlags
pub const VENDOR_8: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_9: AHardwareBufferUsageFlags
pub const VENDOR_9: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_10: AHardwareBufferUsageFlags
pub const VENDOR_10: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_11: AHardwareBufferUsageFlags
pub const VENDOR_11: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_12: AHardwareBufferUsageFlags
pub const VENDOR_12: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_13: AHardwareBufferUsageFlags
pub const VENDOR_13: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_14: AHardwareBufferUsageFlags
pub const VENDOR_14: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_15: AHardwareBufferUsageFlags
pub const VENDOR_15: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_16: AHardwareBufferUsageFlags
pub const VENDOR_16: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_17: AHardwareBufferUsageFlags
pub const VENDOR_17: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_18: AHardwareBufferUsageFlags
pub const VENDOR_18: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Source§impl AHardwareBufferUsageFlags
impl AHardwareBufferUsageFlags
Sourcepub const VENDOR_19: AHardwareBufferUsageFlags
pub const VENDOR_19: AHardwareBufferUsageFlags
The buffer contains a complete mipmap hierarchy. Note that buffers with this flag must be bound to OpenGL textures using the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image.
Trait Implementations§
Source§impl BitAnd for AHardwareBufferUsageFlags
impl BitAnd for AHardwareBufferUsageFlags
Source§impl BitAndAssign for AHardwareBufferUsageFlags
impl BitAndAssign for AHardwareBufferUsageFlags
Source§fn bitand_assign(&mut self, rhs: AHardwareBufferUsageFlags)
fn bitand_assign(&mut self, rhs: AHardwareBufferUsageFlags)
&=
operation. Read moreSource§impl BitOr for AHardwareBufferUsageFlags
impl BitOr for AHardwareBufferUsageFlags
Source§impl BitOrAssign for AHardwareBufferUsageFlags
impl BitOrAssign for AHardwareBufferUsageFlags
Source§fn bitor_assign(&mut self, rhs: AHardwareBufferUsageFlags)
fn bitor_assign(&mut self, rhs: AHardwareBufferUsageFlags)
|=
operation. Read moreSource§impl Clone for AHardwareBufferUsageFlags
impl Clone for AHardwareBufferUsageFlags
Source§fn clone(&self) -> AHardwareBufferUsageFlags
fn clone(&self) -> AHardwareBufferUsageFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more