165 {
166 TRACE_EVENT0(
"flutter",
"VulkanSurfacePool::AgeAndCollectOldBuffers");
167
168
169 size_t size_before = available_surfaces_.size();
170 available_surfaces_.erase(
171 std::remove_if(available_surfaces_.begin(), available_surfaces_.end(),
173 return !surface->IsValid() ||
174 surface->AdvanceAndGetAge() >= kMaxSurfaceAge;
175 }),
176 available_surfaces_.end());
177 TRACE_EVENT1(
"flutter",
"AgeAndCollect",
"aged surfaces",
178 (size_before - available_surfaces_.size()));
179
180
181
182 auto surface_to_remove_it = std::find_if(
183 available_surfaces_.begin(), available_surfaces_.end(),
185 return surface->IsOversized() && surface->HasStableSizeHistory();
186 });
187
188
189 if (surface_to_remove_it != available_surfaces_.end()) {
191 auto size = (*surface_to_remove_it)->GetSize();
192 available_surfaces_.erase(surface_to_remove_it);
195 available_surfaces_.push_back(std::move(
new_surface));
196 } else {
198 << "VulkanSurfaceProducer: Failed to create a new shrunk surface";
199 }
200 }
201
202 TraceStats();
203}
std::unique_ptr< VulkanSurface > CreateSurface(const SkISize &size)
static sk_sp< SkSurface > new_surface(int width, int height)
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
#define TRACE_EVENT0(category_group, name)
#define TRACE_EVENT_INSTANT0(category_group, name)
#define TRACE_EVENT1(category_group, name, arg1_name, arg1_val)