Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
83ff22e
[tests] Update max simulator OS version.
rolfbjarne Mar 10, 2026
6a88e7a
Auto-format source code
Mar 10, 2026
1d0f6a4
There's no tvOS 26.3 simulator.
rolfbjarne Mar 10, 2026
f1901bc
Auto-format source code
Mar 10, 2026
1a34386
Update tests.
rolfbjarne Mar 11, 2026
703b61f
Update XML docs for CGFont.CreateWithFontName
rolfbjarne Mar 11, 2026
31f50a3
[tests] Fix VTDecompressionSession DecodeFrameTest codecBadDataErr on…
rolfbjarne Mar 11, 2026
deb809c
Any of
rolfbjarne Mar 11, 2026
e71296c
[CI] Move to provisionator 3
dalexsoto Mar 13, 2026
0a38089
Add provisionator_uri
dalexsoto Mar 13, 2026
3545290
[CI] Replace Provisionator AzDO task with bootstrap script + SAS toke…
dalexsoto Mar 14, 2026
69d8870
Fix shellcheck warnings in provisionator-bootstrap.sh
dalexsoto Mar 16, 2026
d94a6bc
Remove files....
dalexsoto Mar 16, 2026
9c3a10e
Add .gitignore.
rolfbjarne Mar 16, 2026
f4a0d77
[CI] Bump to use macOS Tahoe
rolfbjarne Mar 16, 2026
db31d03
Merge remote-tracking branch 'origin/dev/rolf/backport-pr-24867-relea…
rolfbjarne Mar 17, 2026
d6665e4
[tests] Fix CGRenderingBufferProviderTest.SizeProperty_DoesNotThrow t…
rolfbjarne Feb 2, 2026
bbcd3a5
[tests] BitmapContextTest.AdaptiveTest to not crash. (#24500)
rolfbjarne Jan 14, 2026
2244b84
[tests] Fix crash in BitmapContextTest.CreateAdaptive_2 by computing …
rolfbjarne Mar 10, 2026
dbbcc8f
[tests] Fix BitmapContextTest.CreateAdaptive_3/_4 crash due to unders…
rolfbjarne Mar 18, 2026
fd01ee1
Merge branch 'release/10.0.1xx' into dev/rolf/backport-pr-24893-relea…
rolfbjarne Mar 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,20 @@ MACCATALYST_SDK_VERSION=$(word 1, $(subst ., ,$(MACCATALYST_NUGET_VERSION))).$(w
MAX_IOS_DEPLOYMENT_TARGET=$(IOS_SDK_VERSION)
MAX_TVOS_DEPLOYMENT_TARGET=$(TVOS_SDK_VERSION)

# Decide which OS version we should run the simulator tests in.
# Note that this may not necessarily match the SDK version, if there are OS releases with no API changes, then there wouldn't necessarily be a corresponding SDK version.
# If the errors below trigger, update the hardcoded Xcode version check (currently 26.3) to use the current Xcode version, and assign the corresponding max simulator versions.
ifeq ($(XCODE_VERSION),26.3)
MAX_IOS_SIMULATOR_VERSION=26.3
MAX_TVOS_SIMULATOR_VERSION=26.2
else ifneq ($(XCODE_VERSION),$(IOS_SDK_VERSION))
$(error Check if a max iOS simulator is different than the current SDK version (this happens when there's a new iOS release, with no API changes so no new SDK))
else ifneq ($(XCODE_VERSION),$(TVOS_SDK_VERSION))
$(error Check if a max tvOS simulator is different than the current SDK version (this happens when there's a new tvOS release, with no API changes so no new SDK))
else
MAX_IOS_SIMULATOR_VERSION=$(IOS_SDK_VERSION)
MAX_TVOS_SIMULATOR_VERSION=$(TVOS_SDK_VERSION)
endif

# Minimum OS versions for running XI/XM apps.
MIN_IOS_SDK_VERSION=12.2
Expand Down
62 changes: 31 additions & 31 deletions src/CoreGraphics/CGFont.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ internal CGFont (NativeHandle handle, bool owns)
{
}

static CGFont Create (IntPtr handle)
static CGFont? Create (IntPtr handle)
{
if (handle == IntPtr.Zero)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (handle));
return null;
return new CGFont (handle, true);
}

Expand All @@ -74,29 +74,27 @@ protected internal override void Release ()
[DllImport (Constants.CoreGraphicsLibrary)]
extern static /* CGFontRef */ IntPtr CGFontCreateWithDataProvider (/* CGDataProviderRef __nullable */ IntPtr provider);

/// <summary>Creates a font from a data provider.</summary>
/// <param name="provider">Data provider that wraps the font.</param>
/// <summary>Creates a font from a data provider.</summary>
/// <returns>The constructed font.</returns>
/// <remarks>
/// <para>
/// You can use this method to create CGFonts from an
/// in-memory representation of the font (for example, to
/// embed binary fonts into your application to prevent easy
/// copying of licensed fonts, or when you fetch the font from
/// a streaming source and do not want to store it on disk).
///
/// </para>
/// <example>
/// <code lang="csharp lang-csharp"><![CDATA[
/// //
/// <returns>The constructed font, or <see langword="null" /> in case of failure.</returns>
/// <remarks>
/// <para>
/// You can use this method to create <see cref="CGFont" /> instances from an
/// in-memory representation of the font (for example, to
/// embed binary fonts into your application to prevent easy
/// copying of licensed fonts, or when you fetch the font from
/// a streaming source and do not want to store it on disk).
/// </para>
/// <example>
/// <code lang="csharp lang-csharp"><![CDATA[
/// //
/// // Load font into byte array from a file.
/// //
/// byte [] myBuffer = File.ReadAllBytes ("demo.ttf");
/// CGFont font = CGFont.CreateFromProvider (new CGDataProvider (myBuffer, 0, myBuffer.Count));
///
/// var myBuffer = File.ReadAllBytes ("demo.ttf");
/// var font = CGFont.CreateFromProvider (new CGDataProvider (myBuffer, 0, myBuffer.Count));
/// ]]></code>
/// </example>
/// </remarks>
/// </example>
/// </remarks>
public static CGFont? CreateFromProvider (CGDataProvider provider)
{
// the API accept a `nil` argument but returns `nil`, we take a shortcut (no native call)
Expand All @@ -111,22 +109,24 @@ protected internal override void Release ()
[DllImport (Constants.CoreGraphicsLibrary)]
extern static /* CGFontRef */ IntPtr CGFontCreateWithFontName (/* CFStringRef __nullable */ IntPtr name);

/// <param name="name">To be added.</param>
/// <summary>Creates a new CGFont representing the specified PostScript or full name.</summary>
/// <returns>To be added.</returns>
/// <remarks>To be added.</remarks>
/// <summary>Creates a new <see cref="CGFont" /> representing the specified PostScript or full name.</summary>
/// <param name="name">The PostScript or full name of the font.</param>
/// <returns>The new <see cref="CGFont" />, or <see langword="null" /> if <paramref name="name" /> is <see langword="null" /> or no matching font is found.</returns>
/// <remarks>
/// <para>
/// This method looks up a font by its PostScript name or full
/// name. If no font matching <paramref name="name" /> is found,
/// the method returns <see langword="null" />.
/// </para>
/// </remarks>
public static CGFont? CreateWithFontName (string name)
{
// the API accept a `nil` argument but returns `nil`, we take a shortcut (no native call)
// and have a unit tests to make sure this behavior does not change over time
if (name is null)
return null;
var nameHandle = CFString.CreateNative (name);
try {
return Create (CGFontCreateWithFontName (nameHandle));
} finally {
CFString.ReleaseNative (nameHandle);
}
var nameHandle = new TransientCFString (name);
return Create (CGFontCreateWithFontName (nameHandle));
}

//[DllImport (Constants.CoreGraphicsLibrary)]
Expand Down
10 changes: 10 additions & 0 deletions tests/common/TestRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,16 @@ public static bool CheckXcodeVersion (int major, int minor, int build = 0)
return CheckMacSystemVersion (26, 2);
#else
throw new NotImplementedException ($"Missing platform case for Xcode {major}.{minor}");
#endif
case 3:
#if __TVOS__
return ChecktvOSSystemVersion (26, 3);
#elif __IOS__
return CheckiOSSystemVersion (26, 3);
#elif MONOMAC
return CheckMacSystemVersion (26, 3);
#else
throw new NotImplementedException ($"Missing platform case for Xcode {major}.{minor}");
#endif
default:
throw new NotImplementedException ($"Missing version logic for checking for Xcode {major}.{minor}");
Expand Down
10 changes: 5 additions & 5 deletions tests/dotnet/UnitTests/expected/iOS-MonoVM-interpreter-size.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
AppBundleSize: 3,610,430 bytes (3,525.8 KB = 3.4 MB)
AppBundleSize: 3,598,151 bytes (3,513.8 KB = 3.4 MB)
# The following list of files and their sizes is just informational / for review, and isn't used in the test:
_CodeSignature/CodeResources: 3,997 bytes (3.9 KB = 0.0 MB)
archived-expanded-entitlements.xcent: 384 bytes (0.4 KB = 0.0 MB)
Info.plist: 1,164 bytes (1.1 KB = 0.0 MB)
Microsoft.iOS.dll: 149,504 bytes (146.0 KB = 0.1 MB)
Info.plist: 1,173 bytes (1.1 KB = 0.0 MB)
Microsoft.iOS.dll: 150,528 bytes (147.0 KB = 0.1 MB)
PkgInfo: 8 bytes (0.0 KB = 0.0 MB)
runtimeconfig.bin: 1,405 bytes (1.4 KB = 0.0 MB)
SizeTestApp: 2,404,544 bytes (2,348.2 KB = 2.3 MB)
SizeTestApp: 2,391,216 bytes (2,335.2 KB = 2.3 MB)
SizeTestApp.dll: 7,680 bytes (7.5 KB = 0.0 MB)
System.Private.CoreLib.aotdata.arm64: 41,296 bytes (40.3 KB = 0.0 MB)
System.Private.CoreLib.aotdata.arm64: 41,312 bytes (40.3 KB = 0.0 MB)
System.Private.CoreLib.dll: 987,136 bytes (964.0 KB = 0.9 MB)
System.Runtime.dll: 5,120 bytes (5.0 KB = 0.0 MB)
System.Runtime.InteropServices.dll: 8,192 bytes (8.0 KB = 0.0 MB)
10 changes: 5 additions & 5 deletions tests/dotnet/UnitTests/expected/iOS-MonoVM-size.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
AppBundleSize: 9,357,320 bytes (9,138.0 KB = 8.9 MB)
AppBundleSize: 9,320,619 bytes (9,102.2 KB = 8.9 MB)
# The following list of files and their sizes is just informational / for review, and isn't used in the test:
_CodeSignature/CodeResources: 5,229 bytes (5.1 KB = 0.0 MB)
aot-instances.aotdata.arm64: 827,592 bytes (808.2 KB = 0.8 MB)
archived-expanded-entitlements.xcent: 384 bytes (0.4 KB = 0.0 MB)
Info.plist: 1,138 bytes (1.1 KB = 0.0 MB)
Microsoft.iOS.aotdata.arm64: 22,832 bytes (22.3 KB = 0.0 MB)
Microsoft.iOS.dll: 47,616 bytes (46.5 KB = 0.0 MB)
Info.plist: 1,173 bytes (1.1 KB = 0.0 MB)
Microsoft.iOS.aotdata.arm64: 22,880 bytes (22.3 KB = 0.0 MB)
Microsoft.iOS.dll: 48,640 bytes (47.5 KB = 0.0 MB)
PkgInfo: 8 bytes (0.0 KB = 0.0 MB)
runtimeconfig.bin: 1,481 bytes (1.4 KB = 0.0 MB)
SizeTestApp: 7,256,864 bytes (7,086.8 KB = 6.9 MB)
SizeTestApp: 7,219,056 bytes (7,049.9 KB = 6.9 MB)
SizeTestApp.aotdata.arm64: 1,456 bytes (1.4 KB = 0.0 MB)
SizeTestApp.dll: 7,168 bytes (7.0 KB = 0.0 MB)
System.Private.CoreLib.aotdata.arm64: 640,736 bytes (625.7 KB = 0.6 MB)
Expand Down
6 changes: 3 additions & 3 deletions tests/dotnet/UnitTests/expected/iOS-NativeAOT-size.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
AppBundleSize: 2,450,623 bytes (2,393.2 KB = 2.3 MB)
AppBundleSize: 2,437,082 bytes (2,380.0 KB = 2.3 MB)
# The following list of files and their sizes is just informational / for review, and isn't used in the test:
_CodeSignature/CodeResources: 2,589 bytes (2.5 KB = 0.0 MB)
archived-expanded-entitlements.xcent: 384 bytes (0.4 KB = 0.0 MB)
Info.plist: 1,130 bytes (1.1 KB = 0.0 MB)
Info.plist: 1,173 bytes (1.1 KB = 0.0 MB)
PkgInfo: 8 bytes (0.0 KB = 0.0 MB)
runtimeconfig.bin: 1,808 bytes (1.8 KB = 0.0 MB)
SizeTestApp: 2,444,704 bytes (2,387.4 KB = 2.3 MB)
SizeTestApp: 2,431,120 bytes (2,374.1 KB = 2.3 MB)
Loading
Loading