-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Internal: b/193583954 b/177473804
Skia attempts to prepare (just in time) the most optimal shaders to render a specific scene. This may be in spite of the presence of an existing shader pipeline that could render the scene identically but less optimally in the steady state. The preparation of these pipeline variants may cause jank.
Skia now allows clients to opt into a mode that disregards opportunities to prepare additional shader variants. The flag needs to be set on the on screen context via its GrContextOptions::fReducedShaderVariations field. Setting the flag on the resource context is unnecessary.
The flag is new and its adoption within Skia is getting better with time. Flutter should opt into this flag ASAP and track it's effects across benchmarks. When enabled (and as Skia makes more use of this flag), Flutter can expect a degradation is steady state performance at the cost of jank. When benchmark regressions are detected, a decision on whether to accept these needs to be made on a case by case basis.
This effort is separate from the asynchronous compilation of shader pipelines and their variants.