Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ac769e68f0bc42f7c63b8a2b0df0cb74345d70f8
https://github.com/WebKit/WebKit/commit/ac769e68f0bc42f7c63b8a2b0df0cb74345d70f8
Author: Myles C. Maxfield <[email protected]>
Date: 2023-01-23 (Mon, 23 Jan 2023)
Changed paths:
M Source/WebCore/Modules/WebGPU/GPU.cpp
M Source/WebCore/Modules/WebGPU/GPU.h
M Source/WebCore/page/Navigator.cpp
Log Message:
-----------
[WebGPU] Simplify GPU initialization
https://bugs.webkit.org/show_bug.cgi?id=250961
rdar://104522195
Reviewed by Tadeu Zagallo.
Previously, there was a 2-step initialization, where you'd create the object
and then
set it's backing. But this means there's an intermediate state where the object
exists
but has no backing. Better to just use a 1-step initialization where the
backing is
passed into the constructor, which eliminates that extra state, thereby
simplifying
the class.
* Source/WebCore/Modules/WebGPU/GPU.cpp:
(WebCore::GPU::GPU):
(WebCore::GPU::requestAdapter):
(WebCore::GPU::setBacking): Deleted.
* Source/WebCore/Modules/WebGPU/GPU.h:
(WebCore::GPU::create):
* Source/WebCore/page/Navigator.cpp:
(WebCore::Navigator::gpu):
Canonical link: https://commits.webkit.org/259203@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes