-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WebGPU] Calling GPUTexture.destroy() on the result of GPUCanvasConte…
…xt.getCurrentTexture() is problematic https://bugs.webkit.org/show_bug.cgi?id=267098 <radar://120494910> Reviewed by Tadeu Zagallo. Calling GPUTexture.destroy() on the result of GPUCanvasContext.getCurrentTexture() was problematic because we don't continuously make new IOSurface backed MTLTexture instances for the canvas. We don't need to, we just need to ensure that calling destroy makes the Texture act like an invalid texture and that calling getCurrentTexture() returns a non-destroyed texture. * Source/WebGPU/WebGPU/PresentationContextIOSurface.mm: (WebGPU::PresentationContextIOSurface::configure): (WebGPU::PresentationContextIOSurface::getCurrentTexture): * Source/WebGPU/WebGPU/Texture.h: * Source/WebGPU/WebGPU/Texture.mm: (WebGPU::Texture::recreateIfNeeded): (WebGPU::Texture::makeCanvasBacking): (WebGPU::Texture::destroy): Canonical link: https://commits.webkit.org/272711@main
- Loading branch information
1 parent
cae26b3
commit b6b15a9
Showing
3 changed files
with
20 additions
and
3 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
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