Skip to content

CanvasKit strokeCap and strokeJoin don't always work #68233

@luigi-rosso

Description

@luigi-rosso

We noticed that in some conditions (oddly it's on certain browsers) the strokeCap and strokeJoin stop working on some shapes.

It's hard to repro in isolation, so I took a peek at what the CanvasKit Paint->SkPaint glue does and it seems like strokeCap and strokeJoin don't get set when Paint object is resurrected. I could verify if this resurrection is the cause if there were a way to force trigger a resurrect (is there?).

Note that when the SkPaint gets resurrected, the strokeCap, strokeJoin, and strokeMiter are not set. I think this might be the cause of the issue:

https://github.com/flutter/engine/blob/dc848f154b9c5534262e5b8d3f0360a1beafdeb5/lib/web_ui/lib/src/engine/canvaskit/painting.dart#L218-L231

I've been seeing this issue since 1.22, but I'm currently on:

[✓] Flutter (Channel unknown, 1.23.0-13.0.pre, on Mac OS X 10.15.6 19G2021 x86_64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.0)

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listc: regressionIt was better in the past than it is nowcustomer: thrivecustomer: web10e: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.platform-webWeb applications specificallywill need additional triageThis issue or PR needs attention before being routed to secondary triage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions