Repository navigation
Conversation
Two things held the pen up after every stroke, measured on 0.0.7-beta (RTX 3080 Ti, Vulkan, WinTab pen, 2520×1575): - remember_last_stroke() flushed the canvas, laying the stroke just ended before the lift returned: 105 ms for a 5734-stamp stroke, 245 ms for an 18416-stamp one. Its step is counted as made instead: Canvas::end_stroke has queued it and the next render makes it, so a later change still shows against it. - lay_stroke() laid the whole stroke again as the pen lifted for wet paint (a blending brush, StrokeStyle::in_place()), which has changed its layer as it went: 67-87 ms for 36-50 samples, about 1.9 ms a stamp through the compute passes, and the frame after the lift waited that long at the surface. Wet paint now counts as laid for good, as a smudge's and an adjustment's do (Canvas::paints_in_place()). After: lift taken in 0.4-2.3 ms, and no surface wait in the frame that follows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two things held the pen up after every stroke, measured on 0.0.7-beta (RTX 3080 Ti, Vulkan, WinTab pen, 2520×1575 canvas):
remember_last_stroke()calledflush(), so the stroke just ended was laid out in full before the lift returned: 105 ms for a 5734-stamp stroke, 245 ms for an 18416-stamp one. Its step is counted as made instead —Canvas::end_strokehas queued it and the next render makes it, so a later change still shows against it.lay_stroke()laid the whole stroke again as the pen lifted for wet paint (a blending brush,StrokeStyle::in_place()), which has changed its layer as it went: 67-87 ms for 36-50 samples, about 1.9 ms a stamp through the compute passes — and the frame after the lift then waited that long at the surface. Wet paint now counts as laid for good, as a smudge's and an adjustment's do (Canvas::paints_in_place()). What the canvas shows while drawing is what the stroke leaves, which is what the brush previewed anyway.After:
lift taken in 0.4-2.3 ms, and no surface wait in the frame that follows.Tests:
cargo test -p procraft-core --lib quickshape(7 passed) andthe_last_stroke_snaps_to_a_shape_until_something_else_is_done;cargo check -p procraft-core -p procraft-gpuclean on top ofmain(3c0d69b).