-
Notifications
You must be signed in to change notification settings - Fork 27.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a GrContextOptions::PersistentCache to Skia #14028
Comments
@chinmaygarde : are you still actively working on this? One developer is having this issue and posted a very simple reproduction: #813 (comment) |
This won't help first-launch performance, though, right? |
Yes, it would only help if the app is reopened. We have to compile the shaders at some time. |
Can we compile them at the same time as we compile the Dart code? |
We don't know what shaders to compile because the Dart code will generate the picture for the rasterizer to render. The shaders to create depend on the complexity of the picture. |
Can we use some slower but more general shaders that are precompiled ahead of time to render the first few frames, while we compile the more specialised shaders we actually need, then swap to the faster ones once we have them? |
There are probably no such general shaders (or uber shaders as I heard from other Skia engineers). However, we can use software backend to render it if no shaders are compiled. On the other hand, maybe we can improve |
Reopened by flutter/engine#6835 |
I'll mark this as a duplicate of #813 so we'll put link all our future work to that single issue. |
Duplicate of #813 |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Implement
GrContextOptions::PersistentCache
and provide it to SkiaGrContextOptions.fPersistentCache
. This allows Skia to cache shaders compilations to persistent storage. Even if platforms cache shader bytecode, Skia still has to do some non-trivial amount of work to generate the shader source in the first place. Using the persistent cache allows Skia to avoid repeating this work.The text was updated successfully, but these errors were encountered: