Add paint renderer compositor tests

This commit is contained in:
2026-06-01 00:13:53 +02:00
parent ac0d0ab49c
commit 4d715afd60
9 changed files with 236 additions and 12 deletions

View File

@@ -0,0 +1,23 @@
#pragma once
#include "foundation/result.h"
#include "paint/blend.h"
#include "renderer_api/renderer_api.h"
#include <span>
namespace pp::paint_renderer {
struct LayerCompositeView {
std::span<const pp::paint::Rgba> pixels;
float opacity = 1.0F;
bool visible = true;
pp::paint::BlendMode blend_mode = pp::paint::BlendMode::normal;
};
[[nodiscard]] pp::foundation::Status composite_layer(
std::span<pp::paint::Rgba> destination,
pp::renderer::Extent2D extent,
LayerCompositeView layer) noexcept;
}