Commit 0bb9469
Extend context loss/restoration test coverage to desynchronized canvas
Desynchronize canvases use a resource dispatcher to push frames and
since the dispatcher is descarded on context loss [1], it's worth adding
test coverage for this.
Note that the frame dispatcher is never recreated after the context is
restored, so the canvas doesn't fully recover from the context loss. The
canvas can be read back though, so the tests still works and we can at
least validate that the context state transitions work properly.
Also note that the OffscreenCanvas doesn't do much with the
`desynchronized` flag, but the test coverage is still useful given that
this flag is listed as supported in MDN [1] and the specification [2].
[1] https://crsrc.org/c/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc;l=290;drc=8abea14deda089834ba142a35e8342014812df55
[2] https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas/getContext
[3] https://html.spec.whatwg.org/multipage/canvas.html#canvas-setting-init-bitmap
Change-Id: I300d1f2827406120896cc7dc38794cb450ea3ed5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7770647
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Jean-Philippe Gravel <jpgravel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1617254}1 parent e852977 commit 0bb9469
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
148 | 154 | | |
149 | 155 | | |
150 | 156 | | |
| |||
0 commit comments