Extract draw merge plane dispatch helper
This commit is contained in:
@@ -514,6 +514,16 @@ static void execute_canvas_draw_merge_plane_final_composite(
|
||||
bool draw_checkerboard,
|
||||
bool use_blend);
|
||||
|
||||
static void execute_canvas_draw_merge_plane_dispatch(
|
||||
Canvas& canvas,
|
||||
int plane_index,
|
||||
const std::vector<std::shared_ptr<Layer>>& layers,
|
||||
const Brush& brush,
|
||||
const glm::mat4& ortho,
|
||||
bool use_blend,
|
||||
bool copy_blend_destination,
|
||||
bool draw_checkerboard);
|
||||
|
||||
static pp::panopainter::LegacyCanvasDrawMergeLayerCompositeExecution make_canvas_draw_merge_branch_dispatch(
|
||||
Canvas& canvas,
|
||||
int plane_index,
|
||||
@@ -733,6 +743,28 @@ static void execute_canvas_draw_merge_plane_iteration(
|
||||
if (!faces[plane_index])
|
||||
continue;
|
||||
|
||||
execute_canvas_draw_merge_plane_dispatch(
|
||||
canvas,
|
||||
plane_index,
|
||||
layers,
|
||||
brush,
|
||||
ortho,
|
||||
use_blend,
|
||||
copy_blend_destination,
|
||||
draw_checkerboard);
|
||||
}
|
||||
}
|
||||
|
||||
static void execute_canvas_draw_merge_plane_dispatch(
|
||||
Canvas& canvas,
|
||||
int plane_index,
|
||||
const std::vector<std::shared_ptr<Layer>>& layers,
|
||||
const Brush& brush,
|
||||
const glm::mat4& ortho,
|
||||
bool use_blend,
|
||||
bool copy_blend_destination,
|
||||
bool draw_checkerboard)
|
||||
{
|
||||
canvas.m_layers_merge.rtt(plane_index).bindFramebuffer();
|
||||
pp::panopainter::execute_legacy_canvas_draw_merge_plane_setup(
|
||||
pp::panopainter::LegacyCanvasDrawMergePlaneSetupUniforms {
|
||||
@@ -774,7 +806,6 @@ static void execute_canvas_draw_merge_plane_iteration(
|
||||
execute_canvas_draw_merge_plane_final_composite(canvas, ortho, draw_checkerboard, use_blend);
|
||||
canvas.m_layers_merge.rtt(plane_index).unbindFramebuffer();
|
||||
}
|
||||
}
|
||||
|
||||
static void execute_canvas_draw_merge_plane_final_composite(
|
||||
Canvas& canvas,
|
||||
|
||||
Reference in New Issue
Block a user