Lines Matching refs:ahwb
585 std::pair<int, std::unique_ptr<MemoryAHWB>> MemoryAHWB::create(const AHardwareBuffer& ahwb) { in create() argument
587 AHardwareBuffer_describe(&ahwb, &bufferDesc); in create()
588 const native_handle_t* handle = AHardwareBuffer_getNativeHandle(&ahwb); in create()
604 AHardwareBuffer* ahwb = nullptr; in create() local
614 int err = AHardwareBuffer_allocate(&desc, &ahwb); in create()
615 if (err != 0 || ahwb == nullptr) { in create()
619 auto allocateGuard = base::make_scope_guard([&ahwb]() { AHardwareBuffer_release(ahwb); }); in create()
622 err = AHardwareBuffer_lock(ahwb, usage, -1, nullptr, &buffer); in create()
627 auto lockGuard = base::make_scope_guard([&ahwb]() { AHardwareBuffer_unlock(ahwb, nullptr); }); in create()
629 const native_handle_t* handle = AHardwareBuffer_getNativeHandle(ahwb); in create()
636 auto memory = std::make_unique<MemoryRuntimeAHWB>(std::move(hidlMemory), ahwb, in create()
643 MemoryRuntimeAHWB::MemoryRuntimeAHWB(hal::hidl_memory memory, AHardwareBuffer* ahwb, in MemoryRuntimeAHWB() argument
645 : Memory(std::move(memory)), mAhwb(ahwb), mBuffer(buffer) { in MemoryRuntimeAHWB()