A task queue designed for managing compilation of pipeline state objects. More...
#include <pipeline_compile_queue.h>
Public Member Functions | |
| virtual | ~PipelineCompileQueue () |
| PipelineCompileQueue (const PipelineCompileQueue &)=delete | |
| PipelineCompileQueue & | operator= (const PipelineCompileQueue &)=delete |
| bool | PostJobForDescriptor (const PipelineDescriptor &desc, const fml::closure &job) |
| Post a compile job for the specified descriptor. | |
| void | PerformJobEagerly (const PipelineDescriptor &desc) |
| If the task has not yet been done, perform it eagerly on the calling thread. This can be used in lieu of an idle wait for the task completion on the calling thread. | |
Static Public Member Functions | |
| static std::shared_ptr< PipelineCompileQueue > | Create (std::shared_ptr< fml::ConcurrentTaskRunner > worker_task_runner) |
A task queue designed for managing compilation of pipeline state objects.
The task queue attempts to perform compile jobs as quickly as possible by dispatching tasks to a concurrent task runner. These tasks are dispatched during renderer creation and usually complete before the first frame is rendered. In this ideal case, this queue is entirely unnecessary and and serves as a thin wrapper around just posting the compile jobs to a concurrent task runner.
If however, usually on lower end device, the compile jobs cannot be completed before the first frame is rendered, the implicit act of waiting for the compile job to be done can instead be augmented to take the pending job and perform it eagerly on the waiters thread. This effectively turns an idle wait into the job skipping to the front of the line and being done on the callers thread.
Again, the entire point of this class is the reduce startup times on the lowest end devices. On high end device, a queue is entirely optional. The queue skipping mechanism all assume the optional availability of a compile queue.
Definition at line 42 of file pipeline_compile_queue.h.
|
virtual |
Definition at line 22 of file pipeline_compile_queue.cc.
|
delete |
|
static |
Definition at line 12 of file pipeline_compile_queue.cc.
|
delete |
| void impeller::PipelineCompileQueue::PerformJobEagerly | ( | const PipelineDescriptor & | desc | ) |
If the task has not yet been done, perform it eagerly on the calling thread. This can be used in lieu of an idle wait for the task completion on the calling thread.
| [in] | desc | The description |
Definition at line 112 of file pipeline_compile_queue.cc.
| bool impeller::PipelineCompileQueue::PostJobForDescriptor | ( | const PipelineDescriptor & | desc, |
| const fml::closure & | job | ||
| ) |
Post a compile job for the specified descriptor.
| [in] | desc | The description |
| [in] | job | The job |
Definition at line 26 of file pipeline_compile_queue.cc.