Eagerly release graphics resources for OffscreenCanvas |
||||||
Issue descriptionIn the case of an HTMLCanvasElement, when a page's visibility changes (e.g. navigating away from the current page), graphics resources will be release when the page is hidden. This is implemented in the function: HTMLCanvasElement::pageVisibilityChanged() In the case of OffscreenCanvas, we should also release graphics resources if the current page is hidden.
,
May 10 2016
To be clear, what should happen when visibility changes is that we should release transient resources: 2D canvas flushes its display list, goes back to being single buffered, may go into hibernation (backing store swapped out of GPU mem). These clean-ups have no side-effects WRT content behavior.
,
May 10 2016
OK. For the WebGL rendering context, there's probably not much that should be done upon backgrounding a tab. On the other hand, WebGL resources should be released eagerly upon JavaScript context termination.
,
Nov 29 2016
,
Nov 29 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 29 2017
,
Dec 1 2017
Will put it under my name first; but anyone who wants to work on it can take it. I think it might be better to start this job after finishing the refactoring on offscreen canvas resource provider.
,
May 7 2018
I took a second look on this task and found its requirement very confusing: Shouldn't visibility change a behavior that's specific to an HTML element instead of OffscreenCanvas (which is an "off screen" thing that is not visible)? Then why must visibility change affect OffscreenCanvas's graphics management? Regarding to kbr@'s comment about "when worker shuts down, resources need to be release", the current CanvasResourceProvider is a unique pointer to OffscreenCanvas; the latter's destructor will automatically cleans up the resources and that's not a concern. I took a hectic move in putting this issue to "archived" status; please revive it if my understanding is wrong. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by kbr@chromium.org
, May 9 2016