mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 13:58:13 +08:00
Implement Infrastructure to reuse previous frames for brush drawing
Implement Infrastructuro to reuse the previous evaluation of the node graph to blend the new stroke with instead of drawing the entire trace from scratch. This does not transition to a blending based approach because that still caused regressions but allows the brush node to work with input data natively. Test Plan: - Use the brush tool in the editor and check for regressions - Evaluate the performance Reviewers: Keavon Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1190
This commit is contained in:
@@ -7,40 +7,6 @@ use graphene_core::vector::VectorData;
|
||||
use graphene_core::Node;
|
||||
use node_macro::node_fn;
|
||||
|
||||
// Spacing is a consistent 0.2 apart, even when tiled across pixels (from 0.9 to the neighboring 0.1), to avoid bias
|
||||
const MULTISAMPLE_GRID: [(f64, f64); 25] = [
|
||||
// Row 1
|
||||
(0.1, 0.1),
|
||||
(0.1, 0.3),
|
||||
(0.1, 0.5),
|
||||
(0.1, 0.7),
|
||||
(0.1, 0.9),
|
||||
// Row 2
|
||||
(0.3, 0.1),
|
||||
(0.3, 0.3),
|
||||
(0.3, 0.5),
|
||||
(0.3, 0.7),
|
||||
(0.3, 0.9),
|
||||
// Row 3
|
||||
(0.5, 0.1),
|
||||
(0.5, 0.3),
|
||||
(0.5, 0.5),
|
||||
(0.5, 0.7),
|
||||
(0.5, 0.9),
|
||||
// Row 4
|
||||
(0.7, 0.1),
|
||||
(0.7, 0.3),
|
||||
(0.7, 0.5),
|
||||
(0.7, 0.7),
|
||||
(0.7, 0.9),
|
||||
// Row 5
|
||||
(0.9, 0.1),
|
||||
(0.9, 0.3),
|
||||
(0.9, 0.5),
|
||||
(0.9, 0.7),
|
||||
(0.9, 0.9),
|
||||
];
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct ReduceNode<Initial, Lambda> {
|
||||
pub initial: Initial,
|
||||
|
||||
Reference in New Issue
Block a user