Open Bug 1445228 Opened 6 years ago Updated 2 years ago

createPattern(canvas) blocks further renderings on given canvas with skia enabled

Categories

(Core :: Graphics: Canvas2D, defect, P3)

59 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: tristan.fraipont, Unassigned)

Details

(Whiteboard: [gfx-noted])

Attachments

(4 files, 1 obsolete file)

When creating a pattern from a CanvasElement is the last operation in the same frame (screen refresh) any further drawing operations on this canvas will not get rendered.

(sorry for the approximative description coming) It is like the canvas rendering is being paused by the createPattern call, and not resumed unless something else has to be rendered before next screen refresh.


Here are a few cases able to workaround the issue:

- Navigating to another tab / window will make the rendering occurs.  
- Drawing in the same js loop
- Drawing in the same screen refresh (single call to rAF)
- Disabling 'gfx.canvas.azure.accelerated' ('gfx.canvas.azure.backends' being set to 'skia')

I could repro in 59 beta, 60 nightly, saw it in an old 57 stable too, but couldn't reproduce it in current 58 stable on osX.
I could also reproduce on a 58 stable on Android.
Because of this, I am not sure I will be able to find a regression-range if any.

____

As an aside, recording this canvas outputs a weirdly sized video of 640 x 480px (while the canvas has he default 300 x 150px, but the rendering is done, and will even fix further experiments on the same tab (even if navigating to other pages).

I do include a testcase for this too since it is most probably related.
Attached file with_workarounds.html
More complex test case, with workarounds
Attached file with_recording.html (obsolete) —
[aside]: test-case with recording of canvas stream:
The resulting video for buggy canvas has weird sizes, but the rendering occurs.
Actually the recording thing is not directly related with the createPattern.
Sorry for the mess.
Attachment #8958414 - Attachment is obsolete: true
Assigning to milan to prioritize
Assignee: nobody → milan
Whiteboard: [gfx-noted]
Assignee: milaninbugzilla → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: