Skip to content

Commit 4b4b192

Browse files
committed
Fill in more docs
1 parent 375ee57 commit 4b4b192

37 files changed

Lines changed: 947 additions & 859 deletions

SkiaSharpAPI/SkiaSharp.Resources/CachingResourceProvider.xml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
</Base>
1313
<Interfaces />
1414
<Docs>
15-
<summary>To be added.</summary>
16-
<remarks>To be added.</remarks>
15+
<summary>A resource provider proxy that caches loaded image assets.</summary>
16+
<remarks>
17+
<para>This provider wraps another <see cref="T:SkiaSharp.Resources.ResourceProvider" /> and caches loaded image assets to avoid repeated loading of the same resources.</para>
18+
<para>Use this provider to improve performance when an animation references the same image assets multiple times.</para>
19+
</remarks>
1720
</Docs>
1821
<Members>
1922
<Member MemberName=".ctor">
@@ -30,9 +33,9 @@
3033
<Parameter Name="resourceProvider" Type="SkiaSharp.Resources.ResourceProvider" />
3134
</Parameters>
3235
<Docs>
33-
<param name="resourceProvider">To be added.</param>
34-
<summary>To be added.</summary>
35-
<remarks>To be added.</remarks>
36+
<param name="resourceProvider">The underlying resource provider to wrap with caching.</param>
37+
<summary>Creates a caching proxy around the specified resource provider.</summary>
38+
<remarks>Image assets loaded through this provider will be cached and reused on subsequent requests for the same resource.</remarks>
3639
</Docs>
3740
</Member>
3841
</Members>

SkiaSharpAPI/SkiaSharp.Resources/DataUriResourceProvider.xml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
</Base>
1313
<Interfaces />
1414
<Docs>
15-
<summary>To be added.</summary>
16-
<remarks>To be added.</remarks>
15+
<summary>A resource provider that can load resources from data URIs embedded in Lottie JSON files.</summary>
16+
<remarks>
17+
<para>Data URIs allow embedding image and font data directly in the Lottie JSON file using base64 encoding. This provider parses and decodes such embedded resources.</para>
18+
<para>Use the constructor with a fallback provider to handle both embedded data URIs and external resources.</para>
19+
</remarks>
1720
</Docs>
1821
<Members>
1922
<Member MemberName=".ctor">
@@ -30,9 +33,12 @@
3033
<Parameter Name="preDecode" Type="System.Boolean" />
3134
</Parameters>
3235
<Docs>
33-
<param name="preDecode">To be added.</param>
34-
<summary>To be added.</summary>
35-
<remarks>To be added.</remarks>
36+
<param name="preDecode">If <see langword="true" />, images are decoded upfront at load time; if <see langword="false" />, images are decoded on-the-fly at rasterization time.</param>
37+
<summary>Creates a data URI resource provider without a fallback provider.</summary>
38+
<remarks>
39+
<para>This constructor creates a provider that only handles data URIs. Resources that are not embedded as data URIs will not be loaded.</para>
40+
<para>Use the constructor with a fallback provider if you need to load both embedded and external resources.</para>
41+
</remarks>
3642
</Docs>
3743
</Member>
3844
<Member MemberName=".ctor">
@@ -50,10 +56,13 @@
5056
<Parameter Name="preDecode" Type="System.Boolean" />
5157
</Parameters>
5258
<Docs>
53-
<param name="fallbackProvider">To be added.</param>
54-
<param name="preDecode">To be added.</param>
55-
<summary>To be added.</summary>
56-
<remarks>To be added.</remarks>
59+
<param name="fallbackProvider">A resource provider to use for resources that are not embedded as data URIs. Can be <see langword="null" />.</param>
60+
<param name="preDecode">If <see langword="true" />, images are decoded upfront at load time; if <see langword="false" />, images are decoded on-the-fly at rasterization time.</param>
61+
<summary>Creates a data URI resource provider with an optional fallback provider.</summary>
62+
<remarks>
63+
<para>Resources that are embedded as data URIs will be decoded directly. Resources that are not data URIs will be delegated to the fallback provider.</para>
64+
<para>A common pattern is to use a <see cref="T:SkiaSharp.Resources.FileResourceProvider" /> as the fallback to load non-embedded resources from the file system.</para>
65+
</remarks>
5766
</Docs>
5867
</Member>
5968
</Members>

SkiaSharpAPI/SkiaSharp.Resources/FileResourceProvider.xml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
</Base>
1313
<Interfaces />
1414
<Docs>
15-
<summary>To be added.</summary>
16-
<remarks>To be added.</remarks>
15+
<summary>A resource provider that loads resources from a directory on the file system.</summary>
16+
<remarks>Use this provider to load Lottie animation assets (images, fonts, nested animations) from a local directory.</remarks>
1717
</Docs>
1818
<Members>
1919
<Member MemberName=".ctor">
@@ -31,10 +31,13 @@
3131
<Parameter Name="preDecode" Type="System.Boolean" />
3232
</Parameters>
3333
<Docs>
34-
<param name="baseDirectory">To be added.</param>
35-
<param name="preDecode">To be added.</param>
36-
<summary>To be added.</summary>
37-
<remarks>To be added.</remarks>
34+
<param name="baseDirectory">The base directory path from which to load resources.</param>
35+
<param name="preDecode">If <see langword="true" />, images are decoded upfront at load time; if <see langword="false" />, images are decoded on-the-fly at rasterization time.</param>
36+
<summary>Creates a new file resource provider with the specified base directory.</summary>
37+
<remarks>
38+
<para>By default, images are decoded on-the-fly at rasterization time. Large images may cause jank as decoding is expensive and can thrash internal caches.</para>
39+
<para>Set <paramref name="preDecode" /> to <see langword="true" /> to force-decode all images upfront, at the cost of potentially more RAM and slower animation build times.</para>
40+
</remarks>
3841
</Docs>
3942
</Member>
4043
</Members>

SkiaSharpAPI/SkiaSharp.Resources/ResourceProvider.xml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
</Base>
1313
<Interfaces />
1414
<Docs>
15-
<summary>To be added.</summary>
16-
<remarks>To be added.</remarks>
15+
<summary>An interface that lets rich-content modules defer loading of external resources (images, fonts, etc.) to embedding clients.</summary>
16+
<remarks>
17+
<para>ResourceProvider is used by <see cref="T:SkiaSharp.Skottie.AnimationBuilder" /> to load external assets referenced by Lottie animations, such as images, fonts, and nested animations.</para>
18+
<para>Several built-in implementations are available: <see cref="T:SkiaSharp.Resources.FileResourceProvider" /> for loading from the file system, <see cref="T:SkiaSharp.Resources.CachingResourceProvider" /> for caching loaded assets, and <see cref="T:SkiaSharp.Resources.DataUriResourceProvider" /> for loading embedded data URIs.</para>
19+
</remarks>
1720
</Docs>
1821
<Members>
1922
<Member MemberName="Load">
@@ -33,10 +36,10 @@
3336
<Parameter Name="resourceName" Type="System.String" />
3437
</Parameters>
3538
<Docs>
36-
<param name="resourceName">To be added.</param>
37-
<summary>To be added.</summary>
38-
<returns>To be added.</returns>
39-
<remarks>To be added.</remarks>
39+
<param name="resourceName">The name of the resource to load.</param>
40+
<summary>Loads a generic resource by name and returns it as data.</summary>
41+
<returns>The resource data, or <see langword="null" /> if the resource could not be loaded.</returns>
42+
<remarks>This is equivalent to calling <see cref="M:SkiaSharp.Resources.ResourceProvider.Load(System.String,System.String)" /> with an empty path.</remarks>
4043
</Docs>
4144
</Member>
4245
<Member MemberName="Load">
@@ -57,11 +60,11 @@
5760
<Parameter Name="resourceName" Type="System.String" />
5861
</Parameters>
5962
<Docs>
60-
<param name="resourcePath">To be added.</param>
61-
<param name="resourceName">To be added.</param>
62-
<summary>To be added.</summary>
63-
<returns>To be added.</returns>
64-
<remarks>To be added.</remarks>
63+
<param name="resourcePath">The path to the resource directory.</param>
64+
<param name="resourceName">The name of the resource to load.</param>
65+
<summary>Loads a generic resource specified by path and name, and returns it as data.</summary>
66+
<returns>The resource data, or <see langword="null" /> if the resource could not be loaded.</returns>
67+
<remarks>This method is typically used to load nested animations or other generic data assets.</remarks>
6568
</Docs>
6669
</Member>
6770
</Members>

0 commit comments

Comments
 (0)