5#ifndef FLUTTER_IMPELLER_RENDERER_PIPELINE_COMPILE_QUEUE_H_
6#define FLUTTER_IMPELLER_RENDERER_PIPELINE_COMPILE_QUEUE_H_
8#include <unordered_map>
43 :
public std::enable_shared_from_this<PipelineCompileQueue> {
127 Mutex pending_jobs_mutex_;
133 size_t priorities_elevated_ = {};
136 void FinishAllJobs();
A task queue designed for managing compilation of pipeline state objects.
virtual void PostJob(const fml::closure &job)=0
Post a compilation job to the worker task runner.
PipelineCompileQueue & operator=(const PipelineCompileQueue &)=delete
bool PostJobForDescriptor(const PipelineDescriptor &desc, const fml::closure &job)
Post a compile job for the specified descriptor.
PipelineCompileQueue(const PipelineCompileQueue &)=delete
bool AddJob(const PipelineDescriptor &desc, const fml::closure &job)
Add a compilation job to the pending queue for the specified descriptor.
void DoOneJob()
Execute one pending compilation job from the queue.
bool HasPendingJobs()
Check if there are any pending compilation jobs in the queue.
PipelineCompileQueue()=default
virtual void OnJobAdded()=0
Called by PostJobForDescriptor after a job has been successfully added to the queue....
virtual ~PipelineCompileQueue()
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...
std::function< void()> closure
#define IPLR_GUARDED_BY(x)