mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-01-14 05:03:24 +01:00
[PR #42] [MERGED] Optimize eraser stroke generation #57
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dscyrescotti/Memola/pull/42
Author: @dscyrescotti
Created: 6/10/2024
Status: ✅ Merged
Merged: 6/10/2024
Merged by: @dscyrescotti
Base:
main← Head:feature/eraser-optimization📝 Commits (10+)
e9708aefeat: save quads by batch1151d1bfeat: store eraser stroke in eraser object20e653cfeat: create new pen using last pen if selected one is eraserc3a14bdrefactor: clean up87b53e0feat: save memo before dismissing canvas view99abf94feat: save stroke as soon as it is created at the beginning of touch90de631bug: remove eraser stroke adding into graphic context63aced9feat: save title changes89b97befeat: fetch eraser objects instead of loading from stroke9c10e46feat: remove erasers in graphic context📊 Changes
21 files changed (+488 additions, -118 deletions)
View changed files
📝
Memola.xcodeproj/project.pbxproj(+4 -0)📝
Memola.xcodeproj/xcshareddata/xcschemes/Memola.xcscheme(+6 -0)📝
Memola/Canvas/Contexts/GraphicContext.swift(+154 -57)📝
Memola/Canvas/Core/Canvas.swift(+3 -2)📝
Memola/Canvas/Geometries/Primitives/Quad.swift(+10 -0)📝
Memola/Canvas/Geometries/Stroke/Strokes/EraserStroke.swift(+84 -0)📝
Memola/Canvas/Geometries/Stroke/Strokes/PenStroke.swift(+89 -15)📝
Memola/Canvas/History/History.swift(+16 -4)📝
Memola/Canvas/RTree/RTree.swift(+11 -3)📝
Memola/Canvas/RenderPasses/EraserRenderPass.swift(+24 -6)📝
Memola/Canvas/RenderPasses/GraphicRenderPass.swift(+22 -0)📝
Memola/Canvas/View/Bridge/ViewController/CanvasViewController.swift(+0 -3)📝
Memola/Canvas/View/Canvas/CanvasView.swift(+3 -3)📝
Memola/Features/Memo/Memo/MemoView.swift(+3 -6)📝
Memola/Features/Memo/PenDock/PenDock.swift(+5 -5)📝
Memola/Features/Memo/Toolbar/Toolbar.swift(+19 -13)📝
Memola/Features/Memos/MemosView.swift(+1 -0)➕
Memola/Persistence/Objects/EraserObject.swift(+20 -0)📝
Memola/Persistence/Objects/QuadObject.swift(+1 -0)📝
Memola/Persistence/Objects/StrokeObject.swift(+2 -1)...and 1 more files
📄 Description
Description
This PR includes the optimization for eraser stroke generation storing erasers in EraserObject. Plus, it also fixes memory leak issues.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.