forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Impeller] Cache location in metadata. (flutter#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.
- Loading branch information
1 parent
b8e7d3c
commit 6de8127
Showing
5 changed files
with
105 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters