From 64f977f6fbedf75d5edbc3963e002b593c8428d8 Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 17 Feb 2026 08:16:03 +0100 Subject: style: Apply clang-format --- src/effects/peak_meter_effect.cc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/effects/peak_meter_effect.cc') diff --git a/src/effects/peak_meter_effect.cc b/src/effects/peak_meter_effect.cc index 124c59b..a2cf6fc 100644 --- a/src/effects/peak_meter_effect.cc +++ b/src/effects/peak_meter_effect.cc @@ -6,8 +6,8 @@ #include "util/fatal_error.h" PeakMeter::PeakMeter(const GpuContext& ctx, - const std::vector& inputs, - const std::vector& outputs) + const std::vector& inputs, + const std::vector& outputs) : Effect(ctx, inputs, outputs), pipeline_(nullptr), bind_group_(nullptr) { HEADLESS_RETURN_IF_NULL(ctx_.device); @@ -58,19 +58,20 @@ PeakMeter::PeakMeter(const GpuContext& ctx, std::string shader_code = ShaderComposer::Get().Compose({"common_uniforms"}, shader_main); - pipeline_ = create_post_process_pipeline(ctx_.device, - WGPUTextureFormat_RGBA8Unorm, - shader_code.c_str()); + pipeline_ = create_post_process_pipeline( + ctx_.device, WGPUTextureFormat_RGBA8Unorm, shader_code.c_str()); } PeakMeter::~PeakMeter() { - if (bind_group_) wgpuBindGroupRelease(bind_group_); - if (pipeline_) wgpuRenderPipelineRelease(pipeline_); + if (bind_group_) + wgpuBindGroupRelease(bind_group_); + if (pipeline_) + wgpuRenderPipelineRelease(pipeline_); } void PeakMeter::render(WGPUCommandEncoder encoder, - const UniformsSequenceParams& params, - NodeRegistry& nodes) { + const UniformsSequenceParams& params, + NodeRegistry& nodes) { WGPUTextureView input_view = nodes.get_view(input_nodes_[0]); WGPUTextureView output_view = nodes.get_view(output_nodes_[0]); @@ -89,7 +90,8 @@ void PeakMeter::render(WGPUCommandEncoder encoder, pass_desc.colorAttachmentCount = 1; pass_desc.colorAttachments = &color_attachment; - WGPURenderPassEncoder pass = wgpuCommandEncoderBeginRenderPass(encoder, &pass_desc); + WGPURenderPassEncoder pass = + wgpuCommandEncoderBeginRenderPass(encoder, &pass_desc); wgpuRenderPassEncoderSetPipeline(pass, pipeline_); wgpuRenderPassEncoderSetBindGroup(pass, 0, bind_group_, 0, nullptr); wgpuRenderPassEncoderDraw(pass, 3, 1, 0, 0); -- cgit v1.2.3