Skip to content

Conversation

@jeremy-visionaid
Copy link

@jeremy-visionaid jeremy-visionaid commented Aug 21, 2025

Description of Change

Update to new GrDirectContext::MakeMetal API for m124 and later.

Also, use retain for setting the pointers to prevent GrMtlBackendContext disposing the command queue.

SkiaSharp Issue

Fixes: mono/SkiaSharp#3178

API Changes

None.

Behavioral Changes

None.

Required SkiaSharp PR

Requires mono/SkiaSharp#3258

PR Checklist

  • Rebased on top of skiasharp at time of PR
  • Changes adhere to coding standard
  • Updated documentation

Copy link

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR.

I think it is fine to just fix the code in src/gpu/ganesh/GrDirectContext.cpp

Then we don't need to worry later.

@jeremy-visionaid
Copy link
Author

jeremy-visionaid commented Aug 22, 2025

Thanks for this PR.

I think it is fine to just fix the code in src/gpu/ganesh/GrDirectContext.cpp

Then we don't need to worry later.

Huh? But what I'm saying is that code is going to get removed upstream, then you'll get a conflict and you'll have to do this anyway...

mono/SkiaSharp#3258 (comment)

Also, use retain for setting the pointers to prevent
GrMtlBackendContext from disposing the command queue.
@mattleibow mattleibow force-pushed the fix-gr_direct_context_make_metal branch from eb833ed to 06fd747 Compare August 22, 2025 17:52
@mattleibow mattleibow merged commit 2260162 into mono:skiasharp Aug 22, 2025
1 check passed
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.

[BUG] iOS: Crash when GC collects SKMetalView resources

2 participants