mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-01-14 05:03:24 +01:00
[PR #26] [MERGED] Optimize canvas loading time #49
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/26
Author: @dscyrescotti
Created: 5/15/2024
Status: ✅ Merged
Merged: 5/15/2024
Merged by: @dscyrescotti
Base:
main← Head:feature/canvas-loading📝 Commits (6)
8ee010bfeat: load only visible strokes42eb3e6feat: add intersection check on canvas view bounds9d2b633feat: wait until vertex generation is completedc0c039efeat: smooth out stroke3ad8075feat: update canvas zoom scale5748fe6feat: load quads using new background context📊 Changes
15 files changed (+145 additions, -41 deletions)
View changed files
📝
Memola/Canvas/Contexts/GraphicContext.swift(+35 -7)📝
Memola/Canvas/Core/Canvas.swift(+12 -4)📝
Memola/Canvas/Geometries/Stroke/Generators/SolidPointStrokeGenerator.swift(+17 -20)📝
Memola/Canvas/Geometries/Stroke/Stroke.swift(+29 -0)📝
Memola/Canvas/RenderPasses/GraphicRenderPass.swift(+1 -0)📝
Memola/Canvas/RenderPasses/StrokeRenderPass.swift(+1 -0)📝
Memola/Canvas/Tool/Pen/PenStyles/EraserPenStyle.swift(+1 -1)📝
Memola/Canvas/Tool/Pen/PenStyles/MarkerPenStyle.swift(+1 -1)📝
Memola/Canvas/View/Bridge/ViewController/CanvasViewController.swift(+21 -5)📝
Memola/Canvas/View/Bridge/Views/DrawingView.swift(+1 -1)📝
Memola/Extensions/CGRect++.swift(+4 -0)📝
Memola/Features/Memos/MemosView.swift(+2 -2)📝
Memola/Persistence/Core/Persistence.swift(+18 -0)📝
Memola/Persistence/Objects/StrokeObject.swift(+1 -0)📝
Memola/Resources/Models/MemolaModel.xcdatamodeld/MemolaModel.xcdatamodel/contents(+1 -0)📄 Description
Description
This PR adds the optimization to canvas loading time when opening the memo. The issue is resolved by loading visible strokes at the initial and generating vertices using compute kernel.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.