Add paint renderer compositor tests
This commit is contained in:
23
src/paint_renderer/compositor.h
Normal file
23
src/paint_renderer/compositor.h
Normal 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;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user