summaryrefslogtreecommitdiff
path: root/src/gpu/sequence.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-03-05 22:55:56 +0100
committerskal <pascal.massimino@gmail.com>2026-03-05 22:55:56 +0100
commit34afbd6ca21d2b960573d787e6eae46fa86b200e (patch)
tree08450aeff4c67fb300428e705910265e6cd59943 /src/gpu/sequence.cc
parent35c9ebb0a7ce0e726f631a2b04bb26098926cfab (diff)
style: run clang-format to adhere to coding style
Diffstat (limited to 'src/gpu/sequence.cc')
-rw-r--r--src/gpu/sequence.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gpu/sequence.cc b/src/gpu/sequence.cc
index 783f3df..1e3be6c 100644
--- a/src/gpu/sequence.cc
+++ b/src/gpu/sequence.cc
@@ -30,7 +30,8 @@ NodeRegistry::NodeRegistry(WGPUDevice device, int default_width,
NodeRegistry::~NodeRegistry() {
for (auto& [name, node] : nodes_) {
- if (node.texture == nullptr) continue; // External view, not owned
+ if (node.texture == nullptr)
+ continue; // External view, not owned
if (node.view) {
wgpuTextureViewRelease(node.view);
}
@@ -107,7 +108,8 @@ void NodeRegistry::resize(int width, int height) {
default_height_ = height;
for (auto& [name, node] : nodes_) {
- if (node.texture == nullptr) continue; // External view, not owned
+ if (node.texture == nullptr)
+ continue; // External view, not owned
// Release old texture
if (node.view) {
wgpuTextureViewRelease(node.view);
@@ -184,8 +186,7 @@ void NodeRegistry::create_texture(Node& node) {
WGPUTextureDescriptor desc = {};
desc.usage = usage;
desc.dimension = WGPUTextureDimension_2D;
- desc.size = {(unsigned int)(node.width),
- (unsigned int)(node.height), 1};
+ desc.size = {(unsigned int)(node.width), (unsigned int)(node.height), 1};
desc.format = format;
desc.mipLevelCount = 1;
desc.sampleCount = 1;
@@ -218,10 +219,8 @@ Sequence::Sequence(const GpuContext& ctx, int width, int height)
void Sequence::preprocess(float seq_time, float beat_time, float beat_phase,
float audio_intensity) {
- params_.resolution = {(float)(width_),
- (float)(height_)};
- params_.aspect_ratio =
- (float)(width_) / (float)(height_);
+ params_.resolution = {(float)(width_), (float)(height_)};
+ params_.aspect_ratio = (float)(width_) / (float)(height_);
params_.time = seq_time;
params_.beat_time = beat_time;
params_.beat_phase = beat_phase;