| Flutter Impeller |

Public Member Functions | List of all members
impeller::UniqueHandleGLES Class Reference

A unique handle to an OpenGL object. The collection of this handle scheduled the destruction of the associated OpenGL object in the reactor. More...

`#include <unique_handle_gles.h>`

## Public Member Functions
| UniqueHandleGLES (ReactorGLES::Ref reactor, HandleType type)
| UniqueHandleGLES (ReactorGLES::Ref reactor, HandleGLES handle)
| ~UniqueHandleGLES ()
| UniqueHandleGLES (UniqueHandleGLES &&)
| UniqueHandleGLES (const UniqueHandleGLES &)=delete
UniqueHandleGLES & | operator= (const UniqueHandleGLES &)=delete
const HandleGLES & | Get () const
bool | IsValid () const

## Detailed Description

A unique handle to an OpenGL object. The collection of this handle scheduled the destruction of the associated OpenGL object in the reactor.

Definition at line 18 of file unique_handle_gles.h.

## Constructor & Destructor Documentation

## ◆ UniqueHandleGLES() [1/4]

impeller::UniqueHandleGLES::UniqueHandleGLES | ( | ReactorGLES::Ref | reactor,
|  | HandleType | type
| ) |  |

Definition at line 11 of file unique_handle_gles.cc.

12 : reactor_(std::move(reactor)) {
13 if (reactor_) {
14 handle_ = reactor_->CreateHandle(type);
15 }
16 }

References type.

## ◆ UniqueHandleGLES() [2/4]

impeller::UniqueHandleGLES::UniqueHandleGLES | ( | ReactorGLES::Ref | reactor,
|  | HandleGLES | handle
| ) |  |

Definition at line 18 of file unique_handle_gles.cc.

19 : reactor_(std::move(reactor)), handle_(handle) {}

## ◆ ~UniqueHandleGLES()

impeller::UniqueHandleGLES::~UniqueHandleGLES | ( |  | ) |

Definition at line 21 of file unique_handle_gles.cc.

21 {
22 if (!handle_.IsDead() && reactor_) {
23 reactor_->CollectHandle(handle_);
24 }
25 }

References impeller::HandleGLES::IsDead().

## ◆ UniqueHandleGLES() [3/4]

impeller::UniqueHandleGLES::UniqueHandleGLES | ( | UniqueHandleGLES && | other | ) |

Definition at line 35 of file unique_handle_gles.cc.

35 {
36 std::swap(reactor_, other.reactor_);
37 std::swap(handle_, other.handle_);
38 }

## ◆ UniqueHandleGLES() [4/4]

impeller::UniqueHandleGLES::UniqueHandleGLES | ( | const UniqueHandleGLES & |  | ) |
| delete

## Member Function Documentation

## ◆ Get()

const HandleGLES & impeller::UniqueHandleGLES::Get | ( |  | ) | const

Definition at line 27 of file unique_handle_gles.cc.

27 {
28 return handle_;
29 }

## ◆ IsValid()

bool impeller::UniqueHandleGLES::IsValid | ( |  | ) | const

Definition at line 31 of file unique_handle_gles.cc.

31 {
32 return !handle_.IsDead();
33 }

References impeller::HandleGLES::IsDead().

## ◆ operator=()

UniqueHandleGLES& impeller::UniqueHandleGLES::operator= | ( | const UniqueHandleGLES & |  | ) |
| delete

The documentation for this class was generated from the following files:

- impeller/renderer/backend/gles/unique_handle_gles.h
- impeller/renderer/backend/gles/unique_handle_gles.cc

impeller::HandleGLES::IsDead
constexpr bool IsDead() const
Determines if the handle is dead.
Definition: handle_gles.h:54
type
GLenum type
Definition: blit_command_gles.cc:127