Skip to content

Fix race condition reading layer properties in a background thread#1181

Merged
m-sasha merged 7 commits intomasterfrom
m-sasha/fix-contexthandler-draw-race-condition
Mar 13, 2026
Merged

Fix race condition reading layer properties in a background thread#1181
m-sasha merged 7 commits intomasterfrom
m-sasha/fix-contexthandler-draw-race-condition

Conversation

@m-sasha
Copy link
Contributor

@m-sasha m-sasha commented Mar 10, 2026

Added a ContextHandler.createDrawScope function which can capture the relevant layer properties (size, scale) and then pass them to drawImpl, which can be called on a background thread.

Fixes https://youtrack.jetbrains.com/issue/SKIKO-1121/Race-condition-reading-layer-size-in-ContextHandler.initCanvas

@m-sasha m-sasha requested a review from igordmn March 10, 2026 15:40
@m-sasha m-sasha changed the title Fix race condition reading layer properties in a background thread. Fix race condition reading layer properties in a background thread Mar 10, 2026
@m-sasha m-sasha requested a review from igordmn March 12, 2026 14:42
@m-sasha m-sasha merged commit 89888a4 into master Mar 13, 2026
19 checks passed
@m-sasha m-sasha deleted the m-sasha/fix-contexthandler-draw-race-condition branch March 13, 2026 00:10
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.

2 participants