Skip to content

Introduces some caching of objects across graphics Skiko code - #3269

Open
Apolo (ApoloApps) wants to merge 7 commits into
JetBrains:jb-mainfrom
ApoloApps:followupMatrixSkikoV2
Open

Introduces some caching of objects across graphics Skiko code#3269
Apolo (ApoloApps) wants to merge 7 commits into
JetBrains:jb-mainfrom
ApoloApps:followupMatrixSkikoV2

Conversation

@ApoloApps

@ApoloApps Apolo (ApoloApps) commented Jul 27, 2026

Copy link
Copy Markdown

(This is reopening of a previous PR)

  1. Reuse Matrix33 in SkiaBackedPath (same behaviour as Android)
  2. Cache FloatArray for addRoundRect methods in Path and GraphicsLayer (Skiko classes, same as Android)
  3. Added SkiaCanvasHolder (same as Android) which caches the SkiaBackedCanvas object across frames to avoid its allocationon every frame (avoids substantial amount of allocations and aligns with Android's behaviour too)

Fixes https://youtrack.jetbrains.com/issue/CMP-9463/Web-asComposeCanvas-method-returns-object-allocated-on-each-rendered-frame (for all targets, not only web)

Release Notes

N/A

…transform call, thus it was transformed twice and causing test error
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