Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
pipeline_compile_queue_vulkan.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
6
9
10namespace impeller {
11
12std::shared_ptr<PipelineCompileQueueVulkan> PipelineCompileQueueVulkan::Create(
13 std::shared_ptr<fml::BasicTaskRunner> worker_task_runner) {
14 if (!worker_task_runner) {
15 return nullptr;
16 }
17 return std::shared_ptr<PipelineCompileQueueVulkan>(
18 new PipelineCompileQueueVulkan(std::move(worker_task_runner)));
19}
20
22 std::shared_ptr<fml::BasicTaskRunner> worker_task_runner)
24 worker_task_runner_(std::move(worker_task_runner)) {}
25
27
29 PostJob([weak_queue = weak_from_this()]() {
30 if (auto queue = std::static_pointer_cast<PipelineCompileQueueVulkan>(
31 weak_queue.lock())) {
32 queue->DoOneJob();
33 }
34 });
35}
36
38 if (!job) {
39 return;
40 }
41
42 worker_task_runner_->PostTask(job);
43}
44
45} // namespace impeller
A task queue designed for managing compilation of pipeline state objects.
A task queue designed for managing compilation of pipeline state objects for Vulkan backend.
static std::shared_ptr< PipelineCompileQueueVulkan > Create(std::shared_ptr< fml::BasicTaskRunner > worker_task_runner)
PipelineCompileQueueVulkan(const PipelineCompileQueueVulkan &)=delete
void OnJobAdded() override
Called by PostJobForDescriptor after a job has been successfully added to the queue....
void PostJob(const fml::closure &job) override
Post a compilation job to the worker task runner.
VkQueue queue
Definition main.cc:71
std::function< void()> closure
Definition closure.h:14
Definition ref_ptr.h:261