Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure ANGLE reaches the nugets #2970

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions binding/SkiaSharp/GRGlInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ private static GRGlInterface CreateGl ()

public static GRGlInterface CreateAngle ()
{
#if (NETSTANDARD || NET6_0_OR_GREATER || NET40_OR_GREATER) && (!NETPLATFORM || WINDOWS) // a cross-platform TFM or windows-only
if (PlatformConfiguration.IsWindows) {
return CreateAngle (AngleLoader.GetProc);
} else {
// return null on non-DirectX platforms: everything except Windows
return null;
}
#else
return null;
#endif
}

// Create* (assemble)
Expand Down Expand Up @@ -112,6 +116,7 @@ internal static GRGlInterface GetObject (IntPtr handle) =>

//

#if (NETSTANDARD || NET6_0_OR_GREATER || NET40_OR_GREATER) && (!NETPLATFORM || WINDOWS)
private static class AngleLoader
{
private static readonly IntPtr libEGL;
Expand Down Expand Up @@ -175,6 +180,7 @@ public static IntPtr GetProc (string name)
return proc;
}
}
#endif

#if __TIZEN__
private class EvasGlLoader
Expand Down
3 changes: 3 additions & 0 deletions scripts/azure-templates-stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ stages:
- name: native_winui_x86_windows
- name: native_winui_x64_windows
- name: native_winui_arm64_windows
- name: native_winui_angle_x86_windows
- name: native_winui_angle_x64_windows
- name: native_winui_angle_arm64_windows
# Nano Server
- name: native_win32_x64_nanoserver_windows
# iOS
Expand Down
4 changes: 4 additions & 0 deletions source/SkiaSharp.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.Contains('-'))">
<DefineConstants>$(DefineConstants);NETPLATFORM</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<DependsOnNETStandard>true</DependsOnNETStandard>
</PropertyGroup>
Expand Down
Loading