Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2f4084835f4b881444e57f4f16eb4425fa5a92e6
https://github.com/WebKit/WebKit/commit/2f4084835f4b881444e57f4f16eb4425fa5a92e6
Author: Myles C. Maxfield <[email protected]>
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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes