Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Canvas context allocation fails because "Total canvas memory use exce…
…eds the maximum limit" https://bugs.webkit.org/show_bug.cgi?id=195325 rdar://48609162 Reviewed by Geoff Garen. Some pages that use a lot of transient canvas memory can hit our artificial limits even when they are no longer referencing canvases. This happens because we don't instantly reclaim memory when we drop the reference, and instead have to wait for garbage collection. This problem can also continue between page refreshes. The limit was introduced many many releases ago when devices had less memory, and it was more common to accidentally jetsam a page if you used too much canvas memory. After some internal and external discussion we've decided to remove the canvas limit and just let the page follow the same memory restrictions as all other Web features. This might mean more pages crash (jetsam) than break. * LayoutTests/fast/canvas/canvas-too-large-to-draw-expected.txt: Removed. * LayoutTests/fast/canvas/canvas-too-large-to-draw.html: Removed. * Source/WebCore/html/CanvasBase.cpp: (WebCore::CanvasBase::allocateImageBuffer const): (WebCore::CanvasBase::maxActivePixelMemory): Deleted. (WebCore::CanvasBase::setMaxPixelMemoryForTesting): Deleted. * Source/WebCore/html/CanvasBase.h: * Source/WebCore/html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createContext2d): * Source/WebCore/testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): (WebCore::Internals::avoidIOSurfaceSizeCheckInWebProcess): (WebCore::Internals::setMaxCanvasPixelMemory): Deleted. * Source/WebCore/testing/Internals.idl: * Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::getPixelBufferForImageBufferWithNewMemory): Canonical link: https://commits.webkit.org/265628@main
- Loading branch information
Showing
14 changed files
with
3 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
LayoutTests/fast/canvas/canvas-too-large-to-draw-expected.txt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
LayoutTests/webgl/webgl-oom-paint-document-no-crash-expected.html
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters