Skip to content

refactor(native): split drawing internals#30

Merged
markm39 merged 4 commits into
mainfrom
refactor/split-native-rendering
May 14, 2026
Merged

refactor(native): split drawing internals#30
markm39 merged 4 commits into
mainfrom
refactor/split-native-rendering

Conversation

@markm39
Copy link
Copy Markdown
Contributor

@markm39 markm39 commented May 14, 2026

Summary

  • move recognized-shape path building, hold recognition, snapping, and shape transform helpers into cpp/ShapeRecognition
  • move shared native drawing structs/history deltas into cpp/DrawingTypes and delta apply/revert helpers into cpp/DrawingHistory
  • move Stroke::ensureEraserCacheValid out of the shared drawing-type header and into cpp/DrawingTypes.cpp
  • split crayon and calligraphy path-renderer implementations into cpp/PathRendererCrayon.cpp and cpp/PathRendererCalligraphy.cpp, leaving shared variable-width/spline logic in cpp/PathRenderer.cpp
  • split SkiaDrawingEngine operations into focused C++ translation units for selection, eraser, and rendering/export behavior while keeping the engine API unchanged
  • update helper headers to depend on drawing types instead of the full engine header
  • include the root package version fix in the example lockfile and keep the native smoke compile linked against the new C++ module

Validation

  • npm run validate
  • clang++ -std=c++20 -fsyntax-only cpp/*.cpp -I cpp -I node_modules/@shopify/react-native-skia/cpp/skia -I node_modules/@shopify/react-native-skia/cpp/skia/modules/pathops/include
  • npm audit --audit-level=moderate
  • npm --prefix example audit --audit-level=moderate fails with the existing Expo/PostCSS moderate advisory; confirmed the same failure on main
  • simplify review: no findings
  • security review: no findings in changed native/package code; example audit advisory remains pre-existing

No device/app run performed per request.

@markm39 markm39 changed the title refactor(native): split shape recognition refactor(native): split drawing internals May 14, 2026
@markm39 markm39 merged commit bdbcb7f into main May 14, 2026
1 check passed
@markm39 markm39 deleted the refactor/split-native-rendering branch May 14, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant