Jonah Williams 9cd50d1229 [Impeller] Cache location in metadata. (flutter/engine#46640)
Hacky mutable stuff, but avoids recomputing string keys and hashing them multiple times per draw call. [See also
](https://docs.google.com/document/d/1msDN8D4_Hi2zR5JFaFLWDb0IHD3MekuuiaYLJ3Tt6to/edit?resourcekey=0-bZbENKIpXKtrnzU6kkLXcQ)

While we cache the uniform location, looking up this value requires computing a string key for every single uniform value on every single command. We can speed this up by stashing the uniform location in the shader metadata, which shouldn't change for the app lifetime. This avoids both the string computation and the hashmap usage.
2023-10-25 22:52:19 +00:00
..