Add renderer and package readiness validation gates

This commit is contained in:
2026-06-15 19:20:56 +02:00
parent 68617e8bc4
commit f78fc3076c
23 changed files with 2350 additions and 389 deletions

View File

@@ -8,6 +8,7 @@
#include <array>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <memory>
#include <span>
#include <string>
@@ -147,6 +148,11 @@ struct StrokePreviewCompositePlan {
bool uses_pattern = false;
};
struct StrokePreviewCopySize {
int width = 0;
int height = 0;
};
struct CanvasBlendGateRequest {
pp::renderer::Extent2D extent {};
std::span<const int> layer_blend_modes;
@@ -530,6 +536,17 @@ export_document_animation_frames_equirectangular_pngs(
[[nodiscard]] StrokePreviewCompositePlan plan_stroke_preview_composite(
StrokePreviewCompositeRequest request) noexcept;
[[nodiscard]] pp::foundation::Status copy_stroke_preview_result_to_texture(
std::function<void()> bind_preview_texture,
std::function<void(
int src_x,
int src_y,
int dst_x,
int dst_y,
int width,
int height)> copy_framebuffer_to_texture,
StrokePreviewCopySize copy_size) noexcept;
[[nodiscard]] pp::foundation::Result<CanvasBlendGatePlan> plan_canvas_blend_gate(
pp::renderer::RenderDeviceFeatures features,
CanvasBlendGateRequest request) noexcept;
@@ -556,4 +573,26 @@ export_document_animation_frames_equirectangular_pngs(
[[nodiscard]] const char* stroke_composite_path_name(StrokeCompositePath path) noexcept;
inline pp::foundation::Status copy_stroke_preview_result_to_texture(
std::function<void()> bind_preview_texture,
std::function<void(
int src_x,
int src_y,
int dst_x,
int dst_y,
int width,
int height)> copy_framebuffer_to_texture,
StrokePreviewCopySize copy_size) noexcept
{
bind_preview_texture();
copy_framebuffer_to_texture(
0,
0,
0,
0,
copy_size.width,
copy_size.height);
return pp::foundation::Status::success();
}
}