Extract draw merge temporary composite wrapper
This commit is contained in:
@@ -76,6 +76,10 @@ agent or engineer to remove them without reconstructing context from chat.
|
|||||||
`execute_legacy_canvas_draw_merge_layer_texture(...)`; per-plane iteration,
|
`execute_legacy_canvas_draw_merge_layer_texture(...)`; per-plane iteration,
|
||||||
temporary-stroke branch selection, and concrete layer RTT ownership remain in
|
temporary-stroke branch selection, and concrete layer RTT ownership remain in
|
||||||
the legacy Canvas path.
|
the legacy Canvas path.
|
||||||
|
- 2026-06-13: DEBT-0036 was narrowed again. `Canvas::draw_merge()` temporary
|
||||||
|
composite setup now routes through `execute_canvas_draw_merge_temporary_composite(...)`;
|
||||||
|
setup, sampler, texture, draw, and unbind callbacks still remain retained in
|
||||||
|
the legacy Canvas path.
|
||||||
- 2026-06-13: DEBT-0036 was narrowed again. `NodeStrokePreview::draw_stroke_immediate()`
|
- 2026-06-13: DEBT-0036 was narrowed again. `NodeStrokePreview::draw_stroke_immediate()`
|
||||||
now routes retained preview feedback/material/composite planning plus stroke
|
now routes retained preview feedback/material/composite planning plus stroke
|
||||||
shader uniform assembly through
|
shader uniform assembly through
|
||||||
|
|||||||
@@ -655,6 +655,11 @@ Progress Notes:
|
|||||||
`Canvas`. Next slice should target another narrow draw-merge execution seam
|
`Canvas`. Next slice should target another narrow draw-merge execution seam
|
||||||
without reopening landed temporary-composite, layer-blend, final-plane, or
|
without reopening landed temporary-composite, layer-blend, final-plane, or
|
||||||
texture-alpha helpers.
|
texture-alpha helpers.
|
||||||
|
- 2026-06-13: `Canvas::draw_merge()` temporary composite setup now routes
|
||||||
|
through `execute_canvas_draw_merge_temporary_composite(...)`; the retained
|
||||||
|
path still owns the concrete setup, sampler, texture, draw, and unbind
|
||||||
|
callbacks. Next slice should target another narrow draw-merge seam without
|
||||||
|
reopening the landed temporary-composite helper.
|
||||||
- 2026-06-13: `pp_paint_renderer_stroke_execution_tests` now also covers
|
- 2026-06-13: `pp_paint_renderer_stroke_execution_tests` now also covers
|
||||||
retained frame-plan assembly for previous-sample projection mode and zoom
|
retained frame-plan assembly for previous-sample projection mode and zoom
|
||||||
scaling. Next slice should target the remaining preview/Canvas stroke
|
scaling. Next slice should target the remaining preview/Canvas stroke
|
||||||
|
|||||||
@@ -480,6 +480,22 @@ void Canvas::stroke_draw_mix(const glm::vec2& bb_min, const glm::vec2& bb_sz)
|
|||||||
gl.restore();
|
gl.restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Setup, typename BindSamplers, typename BindTextures, typename Draw, typename UnbindTextures>
|
||||||
|
static void execute_canvas_draw_merge_temporary_composite(
|
||||||
|
Setup&& setup,
|
||||||
|
BindSamplers&& bind_samplers,
|
||||||
|
BindTextures&& bind_textures,
|
||||||
|
Draw&& draw,
|
||||||
|
UnbindTextures&& unbind_textures)
|
||||||
|
{
|
||||||
|
pp::panopainter::execute_legacy_canvas_stroke_temporary_composite(
|
||||||
|
std::forward<Setup>(setup),
|
||||||
|
std::forward<BindSamplers>(bind_samplers),
|
||||||
|
std::forward<BindTextures>(bind_textures),
|
||||||
|
std::forward<Draw>(draw),
|
||||||
|
std::forward<UnbindTextures>(unbind_textures));
|
||||||
|
}
|
||||||
|
|
||||||
std::array<std::vector<vertex_t>, 6> Canvas::stroke_draw_project(std::array<vertex_t, 4>& B, bool project_3d /*= false*/, glm::mat4 mv /*= glm::mat4(1)*/) const
|
std::array<std::vector<vertex_t>, 6> Canvas::stroke_draw_project(std::array<vertex_t, 4>& B, bool project_3d /*= false*/, glm::mat4 mv /*= glm::mat4(1)*/) const
|
||||||
{
|
{
|
||||||
// intersect P with the current face to clip diverging points from the plane
|
// intersect P with the current face to clip diverging points from the plane
|
||||||
@@ -1435,7 +1451,7 @@ void Canvas::draw_merge(bool draw_checkerboard, std::array<bool, 6> faces /*= SI
|
|||||||
use_blend,
|
use_blend,
|
||||||
pp::panopainter::LegacyCanvasDrawMergeLayerCompositeExecution {
|
pp::panopainter::LegacyCanvasDrawMergeLayerCompositeExecution {
|
||||||
.execute_temporary_erase = [&] {
|
.execute_temporary_erase = [&] {
|
||||||
pp::panopainter::execute_legacy_canvas_stroke_temporary_composite(
|
execute_canvas_draw_merge_temporary_composite(
|
||||||
[&] {
|
[&] {
|
||||||
//ShaderManager::u_vec2(kShaderUniform::Resolution, zw(m_box) / zoom);
|
//ShaderManager::u_vec2(kShaderUniform::Resolution, zw(m_box) / zoom);
|
||||||
//ShaderManager::u_int(kShaderUniform::Lock, m_layers[layer_index]->m_alpha_locked);
|
//ShaderManager::u_int(kShaderUniform::Lock, m_layers[layer_index]->m_alpha_locked);
|
||||||
@@ -1479,7 +1495,7 @@ void Canvas::draw_merge(bool draw_checkerboard, std::array<bool, 6> faces /*= SI
|
|||||||
if (b->m_pattern_flipx) patt_scale.x *= -1.f;
|
if (b->m_pattern_flipx) patt_scale.x *= -1.f;
|
||||||
if (b->m_pattern_flipy) patt_scale.y *= -1.f;
|
if (b->m_pattern_flipy) patt_scale.y *= -1.f;
|
||||||
|
|
||||||
pp::panopainter::execute_legacy_canvas_stroke_temporary_composite(
|
execute_canvas_draw_merge_temporary_composite(
|
||||||
[&] {
|
[&] {
|
||||||
pp::panopainter::setup_legacy_stroke_composite_shader(
|
pp::panopainter::setup_legacy_stroke_composite_shader(
|
||||||
pp::panopainter::LegacyStrokeCompositeUniforms {
|
pp::panopainter::LegacyStrokeCompositeUniforms {
|
||||||
|
|||||||
Reference in New Issue
Block a user