78 {
79 TRACE_EVENT2(
"flutter",
"SoftwareSurfacePool::ProduceSurface",
"width",
80 size.width(),
"height",
size.height());
82
83 std::unique_ptr<SurfaceProducerSurface>
surface;
84 auto exact_match_it =
85 std::find_if(available_surfaces_.begin(), available_surfaces_.end(),
86 [&size](const auto& surface) {
87 return surface->IsValid() && surface->GetSize() == size;
88 });
89 if (exact_match_it != available_surfaces_.end()) {
91 surface = std::move(*exact_match_it);
92 available_surfaces_.erase(exact_match_it);
93 } else {
95 }
96
97 if (surface == nullptr) {
98 FML_LOG(ERROR) <<
"Could not acquire surface.";
99 return nullptr;
100 }
101
102 if (!
surface->FlushSessionAcquireAndReleaseEvents()) {
103 FML_LOG(ERROR) <<
"Could not flush acquire/release events for buffer.";
104 return nullptr;
105 }
106
108}
#define FML_LOG(severity)
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all 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
#define TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, arg2_val)
#define TRACE_EVENT_INSTANT0(category_group, name)