Document Apple Graphite view APIs

Open
#214 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp
Domain
documentation

Research direction

Start by locating the API reference entries for SkiaSharp.Views.iOS, SkiaSharp.Views.Mac, and SkiaSharp.Views.tvOS, then review the listed Graphite view and event-argument types and their signatures. Done means the three types, recorder helpers, failure properties, platform coverage, lifecycle guidance, and Metal/Graphite recovery behavior are documented accurately.

Written by the indexing model from the issue text.

Description

approved-for-context

Document the Apple-native Graphite view APIs added by mono/SkiaSharp#4745.

Platforms/namespaces:

  • iOS and Mac Catalyst: SkiaSharp.Views.iOS
  • macOS: SkiaSharp.Views.Mac
  • tvOS: SkiaSharp.Views.tvOS

Types:

  • SKGraphiteMetalView
  • SKPaintGraphiteSurfaceEventArgs
  • SKGraphiteRenderFailedEventArgs

SKPaintGraphiteSurfaceEventArgs also exposes:

public SKGraphiteRecorder? CreateRecorder();
public SKGraphiteRecorder? CreateRecorder(long recorderBudgetBytes);
public SKGraphiteInsertStatus InsertRecording(SKGraphiteRecording recording);

SKGraphiteRenderFailedEventArgs also exposes:

public SKGraphiteRenderFailedEventArgs(Exception exception, bool requiresContextRecreation);
public bool RequiresContextRecreation { get; }

The recorder helpers support Graphite's multi-recorder model: applications create independent worker-owned Recorders from the view's Context, record and snap work off the UI thread, then insert completed Recordings on the view/Context thread before the presentation Recording. Each helper-created Recorder owns an independent image cache and must be disposed before the view when RequiresContextRecreation is true.

Recovery follows Apple and Skia guidance: Metal device/queue objects remain long-lived for ordinary frame errors, while Graphite Context/Recorder state is recreated after Skia reports an unrecoverable insertion/submission failure. The view pauses and reports failure before recreation; retry is initiated by unpausing after dependent worker Recorders are disposed.

These APIs ship in the existing SkiaSharp.Views package and use Graphite over Metal.

Dominant language
PowerShell
Stars
26
Forks
34
Avg merge
14h 20m
Merged PRs (30d)
9

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mono/SkiaSharp-API-docs

All issues in mono/SkiaSharp-API-docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.