15 handle_ = reactor_->CreateHandle(
type);
21 std::shared_ptr<ReactorGLES>
reactor,
36void UniqueHandleGLES::CollectHandle() {
37 if (!handle_.
IsDead() && reactor_) {
38 reactor_->CollectHandle(handle_);
64 std::swap(reactor_, other.reactor_);
65 std::swap(handle_, other.handle_);
71 std::swap(reactor_, other.reactor_);
72 std::swap(handle_, other.handle_);
Represents a handle to an underlying OpenGL object. Unlike OpenGL object handles, these handles can b...
constexpr bool IsDead() const
Determines if the handle is dead.
static HandleGLES DeadHandle()
Creates a dead handle.
A unique handle to an OpenGL object. The collection of this handle scheduled the destruction of the a...
static UniqueHandleGLES MakeUntracked(std::shared_ptr< ReactorGLES > reactor, HandleType type)
UniqueHandleGLES()=default
const HandleGLES & Get() const
void Reset()
Collect the managed handle and replace it with a dead handle.
UniqueHandleGLES & operator=(UniqueHandleGLES &&)
HandleGLES Release()
Release ownership of the handle.
#define FML_DCHECK(condition)
std::shared_ptr< ReactorGLES > reactor
impeller::ShaderType type