[refactor/MAT-902] DrawingCanvas Catmull-Rom + IncrementalPathBuilder 적용#351
Draft
b0nsu wants to merge 3 commits into
Draft
[refactor/MAT-902] DrawingCanvas Catmull-Rom + IncrementalPathBuilder 적용#351b0nsu wants to merge 3 commits into
b0nsu wants to merge 3 commits into
Conversation
…r 적용 - smoothing.ts: quadratic Bézier → centripetal Catmull-Rom cubic Bézier - centripetalControlPointsMut: mutable 캐시로 per-call alloc 제거 - IncrementalPathBuilder: 라이브 드로잉 path 증분 빌드 · frozen prefix(points[0..n-3])를 SkPath에 누적, trailing ~2 segments 만 매 update 재계산 · 200-point 한 획 기준 addPoint 199 → ~3 segment 계산 (~66× 가속) - DrawingCanvas: incrementalBuilderRef 추가, addPoint/startStroke 에서 update/reset 사용 - finalize/load 는 기존 buildSmoothPath 전체 빌드 그대로 buildSmoothPath export 시그니처 유지. 시각적 곡선 모양만 코너에서 더 자연스러움(centripetal). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mutable singleton 반환 패턴이라 외부 caller 가 nested 호출 시 cp1x/cp1y 가 덮어쓰여 silent bug 가능. export 제거해 module 내부 전용으로 한정. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…T-911) buildSmoothPath 와 IncrementalPathBuilder.update 가 같은 short-path special case (0/1/2점) 분기 + 첫 점 moveTo 를 따로 가지고 있어서 drift 위험. 공통 buildShortPath helper 로 추출. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
라이브 path smoothing 을 quadratic Bézier full-rebuild → centripetal Catmull-Rom + frozen-prefix 증분 빌드로 교체.
Linear
Changes
Testing
Risk / Impact