From 4063939bd80c12a4c60f50a7aaf054a50eff8dee Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Wed, 18 Sep 2019 17:32:08 -0700 Subject: [PATCH] [flutter_runner] Port over the tuning advice (flutter/engine#12345) --- .../fuchsia/flutter/vulkan_surface_producer.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc b/engine/src/flutter/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc index 0b678545bb..fc9f980fac 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc @@ -22,9 +22,17 @@ namespace flutter_runner { namespace { -// TODO: Properly tune these values. See FL-153. constexpr int kGrCacheMaxCount = 8192; -constexpr size_t kGrCacheMaxByteSize = 8 * (1 << 20); +// Tuning advice: +// If you see the following 3 things happening simultaneously in a trace: +// * Over budget ("flutter", "GPURasterizer::Draw") durations +// * Many ("skia", "GrGpu::createTexture") events within the +// "GPURasterizer::Draw"s +// * The Skia GPU resource cache is full, as indicated by the +// "SkiaCacheBytes" field in the ("flutter", "SurfacePool") trace counter +// (compare it to the bytes value here) +// then you should consider increasing the size of the GPU resource cache. +constexpr size_t kGrCacheMaxByteSize = 16 * (1 << 20); } // namespace