[Webkit-unassigned] [Bug 245145] REGRESSION (iOS 16): Sequences of strokes in canvas may stroke with incorrect styles

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 21 01:15:34 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=245145

--- Comment #7 from Paul Neave <paul.neave at gmail.com> ---
(In reply to Simon Fraser (smfr) from comment #3)
> Possibly regressed at https://commits.webkit.org/252522@main

Yes it could be that the batch optimizations/caching introduced here is overaggressive and has not been tested for all cases.

Until this is fixed, a hacky workaround is to adjust the lineWidth between each stroke to circumvent this 'caching' behavior. For example:

```
context.lineWidth = 6;

context.beginPath();
context.strokeStyle = 'red';
context.moveTo(30, 50);
context.lineTo(50, 50);
context.stroke();

context.beginPath();
context.strokeStyle = 'blue';
context.moveTo(60, 50);
context.lineTo(80, 50);
context.stroke();

context.lineWidth = 6.001; // Small adjustment here or the next stroke will remain blue

context.beginPath();
context.strokeStyle = 'red';
context.moveTo(90, 50);
context.lineTo(110, 50);
context.stroke();
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220921/cafb6d3d/attachment.htm>


More information about the webkit-unassigned mailing list