Skip to content

[web] Use EngineScene logic in CanvasKit renderer. #142072

@harryterkelsen

Description

@harryterkelsen

Use case

There is significant code duplication in EngineScene rendering and CanvasKit rendering. For example the Layer system in the EngineScene scheme: https://github.com/flutter/engine/blob/f720a03ede2c9821006fb1f21fb2917eb757b9d5/lib/web_ui/lib/src/engine/layers.dart and the CanvasKit renderer: https://github.com/flutter/engine/blob/1d2fd46d01da499578ffd180da04ad60f299bfc8/lib/web_ui/lib/src/engine/canvaskit/layer.dart

I also plan to duplicate the logic to only render one frame at a time and drop frames when multiple are queued before the current frame is done rendering from EngineSceneView: https://github.com/flutter/engine/blob/3837195399c4c002e874dae34f4305b4f3eb7d09/lib/web_ui/lib/src/engine/scene_view.dart

Proposal

EngineScene is written to be renderer-agnostic, so we should attempt to port CanvasKit rendering to use this Layer logic instead. This will reduce code duplication and our maintenance burden.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.e: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.platform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions