[webkit-reviews] review granted: [Bug 233396] [WebGPU] Send WebGPU messages in the web process : [Attachment 444906] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Nov 20 13:41:56 PST 2021
Dean Jackson <dino at apple.com> has granted Myles C. Maxfield
<mmaxfield at apple.com>'s request for review:
Bug 233396: [WebGPU] Send WebGPU messages in the web process
https://bugs.webkit.org/show_bug.cgi?id=233396
Attachment 444906: Patch
https://bugs.webkit.org/attachment.cgi?id=444906&action=review
--- Comment #5 from Dean Jackson <dino at apple.com> ---
Comment on attachment 444906
--> https://bugs.webkit.org/attachment.cgi?id=444906
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=444906&action=review
> Source/WebKit/Shared/WebGPU/WebGPURenderPassDescriptor.cpp:58
> + auto depthStencilAttachment = ([&] () ->
std::optional<RenderPassDepthStencilAttachment> {
> + if (renderPassDescriptor.depthStencilAttachment)
> + return
convertToBacking(*renderPassDescriptor.depthStencilAttachment);
> + return std::nullopt;
> + })();
> + if (renderPassDescriptor.depthStencilAttachment &&
!depthStencilAttachment)
> + return std::nullopt;
Isn't it less lines to simply do:
std::optional<RenderPassDepthStencilAttachment> depthStencilAttachment;
if (renderPassDescriptor.depthStencilAttachment) {
depthStencilAttachment =
convertToBacking(*renderPassDescriptor.depthStencilAttachment);
if (!depthStencilAttachment)
return std::nullopt;
}
> Source/WebKit/Shared/WebGPU/WebGPURenderPipelineDescriptor.cpp:74
> + auto fragment = ([&] () -> std::optional<FragmentState> {
> + if (renderPipelineDescriptor.fragment)
> + return convertToBacking(*renderPipelineDescriptor.fragment);
> + return std::nullopt;
> + })();
> + if (renderPipelineDescriptor.fragment && !fragment)
> + return std::nullopt;
Another one here.
More information about the webkit-reviews
mailing list