Extract stroke dirty bounds planning
This commit is contained in:
@@ -253,11 +253,18 @@ glm::vec4 NodeStrokePreview::stroke_draw_samples(
|
||||
bool copy_stroke_destination)
|
||||
{
|
||||
const glm::vec2 size = { m_rtt.getWidth(), m_rtt.getHeight() };
|
||||
const std::array<pp::paint_renderer::CanvasStrokePoint, 4> sample_points {
|
||||
pp::paint_renderer::CanvasStrokePoint { .x = P[0].pos.x, .y = P[0].pos.y },
|
||||
pp::paint_renderer::CanvasStrokePoint { .x = P[1].pos.x, .y = P[1].pos.y },
|
||||
pp::paint_renderer::CanvasStrokePoint { .x = P[2].pos.x, .y = P[2].pos.y },
|
||||
pp::paint_renderer::CanvasStrokePoint { .x = P[3].pos.x, .y = P[3].pos.y },
|
||||
};
|
||||
const auto result = pp::panopainter::execute_legacy_canvas_stroke_sample(
|
||||
pp::panopainter::LegacyStrokeSampleExecutionRequest {
|
||||
.context = "NodeStrokePreview::stroke_draw_samples",
|
||||
.target_size = size,
|
||||
.vertices = P,
|
||||
.sample_points = sample_points,
|
||||
.copy_stroke_destination = copy_stroke_destination,
|
||||
.bind_destination_texture = [&] {
|
||||
set_active_texture_unit(1U);
|
||||
|
||||
Reference in New Issue
Block a user