-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
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)
- DlCanvas::ComputeShadowBounds (just some calculations which can be ported over) (see [DisplayList] implement shadow bounds without relying on Skia utilities #172572)
- surface and frame APIs to use impeller/DL geometry (see Migrate surface frame shell code to DisplayList/Impeller geometry classes #173086)
- embedders
- MutatorsStack and Mutator (see Migrate Mutators to DisplayList/Impeller geometry #164258)
- EmbeddedViewParams (see Migrate Embedder code to impeller/DL geometry classes #172804)
- EmbedderExternalView / EmbedderLayers / EmbedderRenderTarget / EmbedderSurface (in conjunction with Migrate surface frame shell code to DisplayList/Impeller geometry classes #173086)
- SkTextBlob could be hidden behind an anonymous interface like Sk/DlPath and have a DlText class that can provide either an SkTextBlob or an impeller::TextFrame as needed by the backend (see Refactor text and runtime effect to separate skia and impeller implementations. #174219)
Things being worked on:
Things which will be converted to DisplayList/Impeller mechanisms proactively:
- Hiding creation of surfaces and their corresponding use of SkSurface, SkColorSpace and associated classes behind an abstraction layer which might make them easier to eliminate for Slimpeller operations
- 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
- The methods in DlCanvas are considered public API at the native level despite not being visible to Flutter and Dart code. For now they are effectively "we all do the same thing as Skia" which has been fine while we've had the Skia backend, but we really need to have them documented independently.
Things that might require significant effort to convert:
- All use of the Skia typographer from behind the scenes (not just hiding use of SkTextBlob vs TextFrame behind a sequestering facade)
- Image codecs
- 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
PathSourceandPathReceiverinterface 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
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
- display_list/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)
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team