Skip to content

Commit

Permalink
[WebGPU] Fix build error in WebGPUOutOfMemoryError and WebGPUExternal…
Browse files Browse the repository at this point in the history
…TextureBindingLayout

https://bugs.webkit.org/show_bug.cgi?id=273821

Reviewed by Mike Wyrzykowski.

This fixes the error: converting to 'std::optional<WebKit::WebGPU::OutOfMemoryError>'
from initializer list would use explicit constructor.

* Source/WebKit/Shared/WebGPU/WebGPUExternalTextureBindingLayout.cpp:
(WebKit::WebGPU::ConvertToBackingContext::convertToBacking):
(WebKit::WebGPU::ConvertFromBackingContext::convertFromBacking):
* Source/WebKit/Shared/WebGPU/WebGPUOutOfMemoryError.cpp:
(WebKit::WebGPU::ConvertToBackingContext::convertToBacking):

Canonical link: https://commits.webkit.org/278537@main
  • Loading branch information
psaavedra committed May 8, 2024
1 parent 7f78e47 commit 9d0e5ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ namespace WebKit::WebGPU {

std::optional<ExternalTextureBindingLayout> ConvertToBackingContext::convertToBacking(const WebCore::WebGPU::ExternalTextureBindingLayout& externalTextureBindingLayout)
{
return { { } };
return { ExternalTextureBindingLayout { } };
}

std::optional<WebCore::WebGPU::ExternalTextureBindingLayout> ConvertFromBackingContext::convertFromBacking(const ExternalTextureBindingLayout& externalTextureBindingLayout)
{
return { { } };
return { WebCore::WebGPU::ExternalTextureBindingLayout { } };
}

} // namespace WebKit
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/Shared/WebGPU/WebGPUOutOfMemoryError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace WebKit::WebGPU {

std::optional<OutOfMemoryError> ConvertToBackingContext::convertToBacking(const WebCore::WebGPU::OutOfMemoryError& outOfMemoryError)
{
return { { } };
return { OutOfMemoryError { } };
}

RefPtr<WebCore::WebGPU::OutOfMemoryError> ConvertFromBackingContext::convertFromBacking(const OutOfMemoryError& outOfMemoryError)
Expand Down

0 comments on commit 9d0e5ac

Please sign in to comment.