#include <vulkan_surface_producer.h>
Definition at line 26 of file vulkan_surface_producer.h.
◆ VulkanSurfaceProducer()
flutter_runner::VulkanSurfaceProducer::VulkanSurfaceProducer |
( |
| ) |
|
|
explicit |
Definition at line 45 of file vulkan_surface_producer.cc.
45 {
46 valid_ = Initialize();
47
48 if (!valid_) {
49 FML_LOG(
FATAL) <<
"VulkanSurfaceProducer: Initialization failed";
50 }
51}
#define FML_LOG(severity)
◆ ~VulkanSurfaceProducer()
flutter_runner::VulkanSurfaceProducer::~VulkanSurfaceProducer |
( |
| ) |
|
|
override |
Definition at line 53 of file vulkan_surface_producer.cc.
53 {
54
55 if (valid_) {
57 vk_->QueueWaitIdle(logical_device_->GetQueueHandle()));
59 }
60};
#define FML_DCHECK(condition)
#define VK_CALL_LOG_ERROR(expression)
◆ gr_context()
GrDirectContext * flutter_runner::VulkanSurfaceProducer::gr_context |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ IsValid()
bool flutter_runner::VulkanSurfaceProducer::IsValid |
( |
| ) |
const |
|
inline |
◆ ProduceOffscreenSurface()
Implements flutter_runner::SurfaceProducer.
Definition at line 289 of file vulkan_surface_producer.cc.
289 {
290 return surface_pool_->CreateSurface(
size);
291}
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
◆ ProduceSurface()
◆ SubmitSurfaces()
void flutter_runner::VulkanSurfaceProducer::SubmitSurfaces |
( |
std::vector< std::unique_ptr< SurfaceProducerSurface > > |
surfaces | ) |
|
|
overridevirtual |
Implements flutter_runner::SurfaceProducer.
Definition at line 171 of file vulkan_surface_producer.cc.
172 {
173 TRACE_EVENT0(
"flutter",
"VulkanSurfaceProducer::SubmitSurfaces");
174
175
176 {
177 TRACE_EVENT0(
"flutter",
"GrDirectContext::flushAndSignalSemaphores");
179 }
180
181 if (!TransitionSurfacesToExternal(surfaces))
182 FML_LOG(
ERROR) <<
"TransitionSurfacesToExternal failed";
183
184
185 for (
auto&
surface : surfaces) {
186 SubmitSurface(std::move(
surface));
187 }
188
189
190 surface_pool_->AgeAndCollectOldBuffers();
191
192
193
194 constexpr auto kShouldShrinkThreshold = zx::msec(10 * 16.67);
195 async::PostDelayedTask(
196 async_get_default_dispatcher(),
197 [
self = weak_factory_.GetWeakPtr(), kShouldShrinkThreshold] {
198 if (!self) {
199 return;
200 }
201 auto time_since_last_produce =
202 async::Now(async_get_default_dispatcher()) -
203 self->last_produce_time_;
204 if (time_since_last_produce >= kShouldShrinkThreshold) {
205 self->surface_pool_->ShrinkToFit();
206 }
207 },
208 kShouldShrinkThreshold);
209}
void flushAndSubmit(GrSyncCpu sync=GrSyncCpu::kNo)
#define TRACE_EVENT0(category_group, name)
The documentation for this class was generated from the following files: