[webkit-changes] [WebKit/WebKit] 2f4084: [WebGPU] Simplify the lifetime of GPUPresentationC...
Myles C. Maxfield
noreply at github.com
Mon Jan 30 09:55:42 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2f4084835f4b881444e57f4f16eb4425fa5a92e6
https://github.com/WebKit/WebKit/commit/2f4084835f4b881444e57f4f16eb4425fa5a92e6
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-01-30 (Mon, 30 Jan 2023)
Changed paths:
M Source/WebCore/html/canvas/GPUCanvasContextCocoa.cpp
M Source/WebCore/html/canvas/GPUCanvasContextCocoa.h
Log Message:
-----------
[WebGPU] Simplify the lifetime of GPUPresentationContext within GPUCanvasContextCocoa
https://bugs.webkit.org/show_bug.cgi?id=251067
rdar://104784569
Reviewed by Tadeu Zagallo.
There's no reason to lazily create the GPUPresentationContext; we can just create
it eagerly, which allows us to use a Ref instead of a RefPtr for the object,
thereby eliminating one potential state in the class.
* Source/WebCore/html/canvas/GPUCanvasContextCocoa.cpp:
(WebCore::presentationContextDescriptor):
(WebCore::GPUCanvasContextCocoa::GPUCanvasContextCocoa):
(WebCore::GPUCanvasContextCocoa::reshape):
(WebCore::GPUCanvasContextCocoa::unconfigurePresentationContextIfNeeded):
(WebCore::GPUCanvasContextCocoa::configurePresentationContextIfNeeded):
(WebCore::GPUCanvasContextCocoa::getCurrentTexture):
(WebCore::GPUCanvasContextCocoa::createPresentationContextIfNeeded): Deleted.
* Source/WebCore/html/canvas/GPUCanvasContextCocoa.h:
Canonical link: https://commits.webkit.org/259564@main
More information about the webkit-changes
mailing list