-
Notifications
You must be signed in to change notification settings - Fork 6k
focus SkiaGPUObject wrappers on only those objects that need the protection #41237
Conversation
be430f9
to
d82cdb5
Compare
It looks like there are more unit tests that run into the same problem.
|
d82cdb5
to
6b47eba
Compare
The use of SkiaGPUObject wrappers is now limited to the following files that need to wrap an image for use in a UI thread:
|
And only a couple of files need to use the enqueueing DlImageGPU as seen here:
Note that the last 2 references outside of lib/ui are just comments that those lines of code are not responsible for protecting the images (and, in fact, the code in |
…125039) flutter/engine@c4396f9...d297361 2023-04-18 leroux_bruno@yahoo.fr [macOS] Fix Ctrl+Tab is broken (flutter/engine#40706) 2023-04-18 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from K1LGtKXyxRlW3Q9O1... to qZHSvkpAU1-YYGvYc... (flutter/engine#41293) 2023-04-18 aam@google.com Roll buildroot to 059d155b4d452efd9c4427c45cddfd9445144869 (flutter/engine#41288) 2023-04-18 bdero@google.com [Impeller] Remove glyph pixel rounding during text frame conversion (flutter/engine#41285) 2023-04-18 godofredoc@google.com Revert "Reland "Migrate mac_host_engine to engine v2 builds."" (flutter/engine#41284) 2023-04-17 flar@google.com focus SkiaGPUObject wrappers on only those objects that need the protection (flutter/engine#41237) Also rolling transitive DEPS: fuchsia/sdk/core/mac-amd64 from K1LGtKXyxRlW to qZHSvkpAU1-Y If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
With this PR we no longer need to hold DisplayLists in GPUObject wrappers and they can be disposed instantly instead of queueing on the Unref thread.
This will definitely be a win for Impeller as none of the objects used in a frame now require queueing, but the performance impact on apps running on top of skia is less clear if they depend on a lot of images inside their DisplayLists that still need to be queued to be freed. After getting further in the work, it looks like only decoded images need to use the protected DlImage wrappers and most of those should survive many frames before they are disposed. That should hopefully leave very few unrefs happening per frame.
There are 3 unit tests in(This looks to be fixed in the latest commit by simply not creating DlImageGPUs all over the source base and simply catching only those that end up in UI data structures. There is actually existing code in one of the modules that feeds ui.Image with an answer to wrap the image in a DlImageGPU if it has a skia image anyway, so most of these additional uses of DlImageGPU that were having trouble getting the Skia unref queue just didn't need it anyway.)shell_unittests.cc
andembedder_metal_unittests.mm
that are now GSKIP'd as they now invoke code that needs a fully initialized UIDartState in order to protect their images. I will look into fixing the tests and/or making the code they invoke provide protection without relying on UIDartState.