Skip to content

DL/Geometry engine migration tracking issue #161456

Open
@flar

Description

@flar

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:

Things being worked on:

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 and PathReceiver 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listengineflutter/engine repository. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions