5#ifndef FLUTTER_IMPELLER_TOOLKIT_ANDROID_HARDWARE_BUFFER_H_
6#define FLUTTER_IMPELLER_TOOLKIT_ANDROID_HARDWARE_BUFFER_H_
10#include "flutter/fml/unique_fd.h"
11#include "flutter/fml/unique_object.h"
159 struct UniqueAHardwareBufferTraits {
163 return value != InvalidValue();
171 const HardwareBufferDescriptor descriptor_;
172 const AHardwareBuffer_Desc android_descriptor_;
174 bool is_valid_ =
false;
struct AHardwareBuffer AHardwareBuffer
A wrapper for AHardwareBuffer https://developer.android.com/ndk/reference/group/a-hardware-buffer.
HardwareBuffer & operator=(const HardwareBuffer &)=delete
HardwareBuffer(HardwareBufferDescriptor descriptor)
static bool IsAvailableOnPlatform()
const HardwareBufferDescriptor & GetDescriptor() const
AHardwareBuffer * GetHandle() const
const AHardwareBuffer_Desc & GetAndroidDescriptor() const
bool Unlock() const
Unlock a mapping previously locked for CPU access.
static std::optional< AHardwareBuffer_Desc > Describe(AHardwareBuffer *buffer)
HardwareBuffer(const HardwareBuffer &)=delete
void * Lock(CPUAccessType type) const
Lock the buffer for CPU access. This call may fail if the buffer was not created with one the usages ...
std::optional< uint64_t > GetSystemUniqueID() const
Get the system wide unique ID of the hardware buffer if possible. This is only available on Android A...
static void Free(FreeList *free_list, uword address, intptr_t size, bool is_protected)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
const ProcTable & GetProcTable()
IMPELLER_ENUM_IS_MASK(MyMaskBits)
A descriptor use to specify hardware buffer allocations.
static HardwareBufferDescriptor MakeForSwapchainImage(const ISize &size)
Create a descriptor of the given size that is suitable for use as a swapchain image.
constexpr bool operator==(const HardwareBufferDescriptor &o) const
constexpr bool operator!=(const HardwareBufferDescriptor &o) const
HardwareBufferUsage usage
bool IsAllocatable() const
If hardware buffers can be created using this descriptor. Allocatable descriptors may still cause fai...
HardwareBufferFormat format