Skip to content

[web] Canvas.saveLayer does not work in HTML mode #48417

@creativecreatorormaybenot

Description

canvas.drawRect(...);
canvas.saveLayer(null, Paint()..blendMode = BlendMode.multiply);

canvas.drawRect(...);
canvas.restore();

This works fine when running Flutter on Android and looks like this:

Screen capture

When running the same code in Flutter Web, it looks like this (saveLayer is ignored):

Screen capture

When I move the blendMode to the Paint I pass to the second drawRect, it also works on Flutter web.

flutter doctor -v
[√] Flutter (Channel master, v1.13.7-pre.41, locale en-US)
    • Flutter version 1.13.7-pre.41 at flutter
    • Framework revision fa337f5922 (2 days ago), 2020-01-06 16:44:12 -0800
    • Engine revision 3851981b86
    • Dart version 2.8.0 (build 2.8.0-dev.0.0 2f57602411)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: renderingUI glitches reported at the engine/skia or impeller rendering levele: web_htmlHTML rendering backend for Webengineflutter/engine related. See also e: labels.found in release: 3.13Found to occur in 3.13found in release: 3.17Found to occur in 3.17has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: solvedIssue is closed as solvedteam-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