Open
Description
The engine is slowly being migrated to only use DisplayList/Impeller geometry classes throughout its code and the associated Skia objects will only be used when talking directly to Skia, say, in the Skia DisplayList adapter interfaces.
Converted/done items:
- Unit tests in the impeller/ directory (see [Impeller] Migrate unit tests off of Skia geometry classes #161855) (reland Reland "[Impeller] Migrate unit tests off of Skia geometry classes (#161855)" #162146)
- Unit tests in the display_list/ directory (see Migrate DisplayList unit tests to DL/Impeller geometry classes #161453)
- AccumulationRect and MatrixClipTracker (see [DisplayList] remove obsolete use of Skia geometry objects in DL utils #161553)
- SkRSXform which has no Impeller equivalent yet (see [DisplayList] Migrate from SkRSXform to Impeller RSTransform #161652)
- Benchmarks and geometry object usage in DL rendering tests (see [DisplayList] Migrate rendering tests and benchmarks to DL geometry #163766)
- raster_cache use of DlCanvas legacy APIs (they also still use Skia underneath for allocation, but they should not have any references to the DlCanvas and other DL APIs that use Skia APIs) (see [DisplayList] Delete all legacy Skia-oriented method overloads in DlCanvas #164054)
- delete the Legacy overload methods in DlCanvas that use Skia Gometry classes (see [DisplayList] Delete all legacy Skia-oriented method overloads in DlCanvas #164054)
Things being worked on:
- embedders
- MutatorsStack and Mutator (see Migrate Mutators to DisplayList/Impeller geometry #164258)
- EmbeddedViewParams
Things which will be converted to DisplayList/Impeller mechanisms proactively:
- ImageFilter unit tests which use Skia filters to compare things like bounds behaviors.
- there are still some bugs filed against this mechanism that should be fixed before we remove these tests
- they should be replaced with "here is the expected answer" tests in lieu of using Skia to generate the correct answers
- dl_path_unittests which could be verified using the PathReceiver interface rather than comparing to an SkPath instance.
- dl_region unit tests which only use Skia geometry to test results
- these should be replaced with "expected answer" tests rather than comparing to Skia results
- impeller/
- flow/
- shell/
- SkRefCnt -> standard managed pointers
- SkTextBlob should be hidden behind an anonymous interface like SkPath and have a DlText class that can provide either an SkTextBlob or an impeller::TextFrame as needed by the backend
Things that might require significant effort to convert:
- dl_path itself which defers to SkPath for most of its construction work. As long as we support Skia as a backend then there is a performance reason to supply the paths as SkPath. Part of this is to prevent conversion on the Skia backend (Impeller no longer needs to convert paths, it simply iterates them via the
PathSource
andPathReceiver
interface which can be implemented directly by the DlPath wrapper for SkPath objects without loss of performance). Another reason is that Skia tracks the volatility of paths and may cache them in some places so providing a stable instance of SkPath, rather than a converted copy, will work better with these mechanisms. - SkPathOps which are a major geometry sub-system living in the Skia source base and support only SkPath objects. It may be possible to use them with Impeller Paths by just converting the path to an SkPath, but eventually the engine should have a self-sufficient set of path ops.
- dl_rendering_unittests
- we should eliminate the "does rendering via DisplayList match rendering via SkPicture?" tests as we no longer support SkPicture at all (and would eliminate a ton of "how to render the same thing via SkCanvas" code)
- we should also get these up and running on Impeller as an output backend (sort of works, but needs bug fixing)
- still has a lot of surface creation code in it which is another bullet item here
- Any use of SkSurface, SkColorSpace and their associated classes to manage surfaces
Things that will never be converted as they will eventually be deleted when we stop using Skia:
- dl_geometry unit tests which only use Skia classes to test the current Skia/Impeller conversion macros which will eventually go away when all non-Skia code is solely using the dl_geometry stubs
- skia/ directory - will never be converted as its purpose is to interpret DisplayLists for Skia
- internal workings of the raster_cache classes which won't be used under Impeller (other than migrating their use of DlCanvas and other public API methods to the non-Skia overrides and potentially their external API which is used in several places in the engine, but the internal code can use Skia all it needs to)