Bug 248816 - Canvas flickers when combining putImageData and other draw calls
Summary: Canvas flickers when combining putImageData and other draw calls
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: Safari 15
Hardware: iPhone / iPad iOS 15
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-06 06:41 PST by ae
Modified: 2022-12-13 06:42 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ae 2022-12-06 06:41:42 PST
I have a Canvas which I update roughly 30 times per second with a putImageData call and a few simple line drawing calls.

The line drawing seems to fail intermittently, as the lines flicker.
Comment 1 Simon Fraser (smfr) 2022-12-06 16:19:20 PST
Can you give us access to a page that reproduces this, or attach a small test case?
Comment 2 ae 2022-12-07 03:09:38 PST
(In reply to Simon Fraser (smfr) from comment #1)
> Can you give us access to a page that reproduces this, or attach a small
> test case?

I'll try to do my best. The problem occurs in a very complex hybrid web app running in a WKWebView with multiple other canvases and a lot going on in general, so it might not be straightforward. I do know that it's not a trivial problem in my code because the same code works in Blink and it's really just a putImageData followed by 3 beginPath/moveTo/lineTo/stroke calls. There's also no other (transparent) layers on top of the canvas so I don't think it's a composting problem. Setting transform:translate3d(0,0,0) on the canvas doesn't help either.

I'll try to make a minimal test case when I got time. Thanks.
Comment 3 Radar WebKit Bug Importer 2022-12-13 06:42:16 PST
<rdar://problem/103299941>