OffscreenCanvas stops rendering after resize
Reported by
a...@scirra.com,
Jul 24
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3501.0 Safari/537.36 Steps to reproduce the problem: I'm not 100% sure if this is a Chrome bug but here we go. In our HTML5 game engine Construct 3 we are experimenting with hosting the entire engine in a Web Worker using OffscreenCanvas. A user discovered the following issue with OffscreenCanvas in worker mode. DOM test: https://www.scirra.com/labs/bugs/spritestressdom/index.html Worker test: https://www.scirra.com/labs/bugs/spritestressworker/index.html NOTE: this requires OffscreenCanvas to be enabled, which it is by default in the latest Canary builds. For each test try the following steps: 1. Click to create a few sprites. Observe how they slowly rotate. 2. Resize the browser window. What is the expected behavior? The canvas should continue rendering, as it does in the DOM test. What went wrong? In the worker test, after resizing the browser window the canvas freezes and stops rendering new frames. In the debugger I can see rAF callbacks still firing, our rendering code still running, and our resize event handlers continuing to respond if you keep resizing the browser window. No exceptions are raised. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 70.0.3501.0 Channel: canary OS Version: 10.0 Flash Version: This could be an issue in our engine but I filed an issue based on: - no exceptions raised - code appears to continue running as normal - most code is shared between DOM and Worker mode, but only Worker mode doesn't work - the "set size" code is run on startup as well to set the initial size, and seems to work fine, but only subsequent resizes seem to fail Apologies if this turns out to be our code but thought it might warrant a look from Google, especially since OffscreenCanvas is proceeding to ship. If there is some JS mistake here then perhaps adding some console logging or diagnostics might be useful.
,
Jul 24
,
Jul 24
,
Jul 24
,
Jul 25
,
Jul 26
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d2e0f2c6027de3c9db038ff74af054b0171ce2df commit d2e0f2c6027de3c9db038ff74af054b0171ce2df Author: Justin Novosad <junov@chromium.org> Date: Thu Jul 26 16:01:13 2018 Fix webgl freeze after OffscreenCanvas resize This CL discards the pre-existing CanvasResourceProvider instance if it is not of the right size when pushing a WebGL animation frame. BUG= 866855 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Ibfa8924102dfcd2815a6010b0b9ada6c37fdd5ab Reviewed-on: https://chromium-review.googlesource.com/1148685 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Justin Novosad <junov@chromium.org> Cr-Commit-Position: refs/heads/master@{#578320} [add] https://crrev.com/d2e0f2c6027de3c9db038ff74af054b0171ce2df/content/test/data/gpu/pixel_offscreenCanvas_webgl_paint_after_resize.html [modify] https://crrev.com/d2e0f2c6027de3c9db038ff74af054b0171ce2df/content/test/gpu/gpu_tests/pixel_test_pages.py [modify] https://crrev.com/d2e0f2c6027de3c9db038ff74af054b0171ce2df/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
,
Jul 26
,
Jul 27
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by woxxom@gmail.com
, Jul 24