| Flutter Impeller |

Public Member Functions | List of all members
impeller::PlaygroundImplGLES::ReactorWorker Class Referencefinal
Inheritance diagram for impeller::PlaygroundImplGLES::ReactorWorker:

## Public Member Functions
| ReactorWorker ()=default
bool | CanReactorReactOnCurrentThreadNow (const ReactorGLES &reactor) const override
| Determines the ability of the worker to service a reaction on the current thread. The OpenGL context must be current on the thread if the worker says it is able to service a reaction. More...
void | SetReactionsAllowedOnCurrentThread (bool allowed)
Public Member Functions inherited from impeller::ReactorGLES::Worker
virtual | ~Worker ()=default

## Detailed Description

Definition at line 28 of file playground_impl_gles.cc.

## Constructor & Destructor Documentation

## ◆ ReactorWorker()

impeller::PlaygroundImplGLES::ReactorWorker::ReactorWorker | ( |  | ) |
| default

## Member Function Documentation

## ◆ CanReactorReactOnCurrentThreadNow()

bool impeller::PlaygroundImplGLES::ReactorWorker::CanReactorReactOnCurrentThreadNow | ( | const ReactorGLES & | reactor | ) | const
| inline override virtual

Determines the ability of the worker to service a reaction on the current thread. The OpenGL context must be current on the thread if the worker says it is able to service a reaction.

Parameters

  [in] | reactor | The reactor

Returns
  If the worker is able to service a reaction. The reactor assumes the context is already current if true.

Implements impeller::ReactorGLES::Worker.

Definition at line 33 of file playground_impl_gles.cc.

34 {
35 ReaderLock lock(mutex_);
36 auto found = reactions_allowed_.find(std::this_thread::get_id());
37 if (found == reactions_allowed_.end()) {
38 return false;
39 }
40 return found->second;
41 }

## ◆ SetReactionsAllowedOnCurrentThread()

void impeller::PlaygroundImplGLES::ReactorWorker::SetReactionsAllowedOnCurrentThread | ( | bool | allowed | ) |
| inline

Definition at line 43 of file playground_impl_gles.cc.

43 {
44 WriterLock lock(mutex_);
45 reactions_allowed_[std::this_thread::get_id()] = allowed;
46 }

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

- impeller/playground/backend/gles/playground_impl_gles.cc