5#ifndef FLUTTER_VULKAN_PROCS_VULKAN_HANDLE_H_
6#define FLUTTER_VULKAN_PROCS_VULKAN_HANDLE_H_
10#include "flutter/fml/logging.h"
11#include "flutter/fml/macros.h"
12#include "flutter/vulkan/procs/vulkan_interface.h"
25 : handle_(handle), disposer_(disposer) {}
28 : handle_(other.handle_), disposer_(
std::move(other.disposer_)) {
30 other.disposer_ =
nullptr;
36 if (handle_ != other.handle_) {
40 handle_ = other.handle_;
41 disposer_ = other.disposer_;
44 other.disposer_ =
nullptr;
52 operator Handle()
const {
return handle_; }
59 void Reset() { DisposeIfNecessary(); }
65 void DisposeIfNecessary() {
VulkanHandle(Handle handle, const Disposer &disposer=nullptr)
VulkanHandle(VulkanHandle &&other)
VulkanHandle & operator=(VulkanHandle &&other)
std::function< void(Handle)> Disposer
Dart_NativeFunction function