[Webkit-unassigned] [Bug 229668] Canvas Memory Leak if not appended to DOM (when Canvas in GPU Process is enabled)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 31 01:23:25 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=229668

--- Comment #4 from Said Abou-Hallawa <sabouhallawa at apple.com> ---
The reason of this bug is the if-statement in this loop in Document::prepareCanvasesForDisplayIfNeeded():

    for (auto& canvas : canvases) {
        // However, if they are not in the document body, then they won't
        // be composited and thus don't need preparation. Unfortunately they
        // can't tell at the time they were added to the list, since they
        // could be inserted or removed from the document body afterwards.
        if (!canvas->isInTreeScope())
            continue;
        canvas->prepareForDisplay();
    }

So if the canvas was not added to the DOM, prepareForDisplay() will not be called. This causes the images of the video to be accumulated in the WebProcess side and hence they are never released in the GPUProcess as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210831/8bbc1755/attachment.htm>


More information about the webkit-unassigned mailing list