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

Remove enable drawing on unix switch #64084

Merged
merged 3 commits into from
Jan 21, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -87,34 +87,8 @@ private static bool GetLinqExpressionsBuiltWithIsInterpretingOnly()
return !(bool)typeof(LambdaExpression).GetMethod("get_CanCompileToIL").Invoke(null, Array.Empty<object>());
}

// Please make sure that you have the libgdiplus dependency installed.
// For details, see https://docs.microsoft.com/dotnet/core/install/dependencies?pivots=os-macos&tabs=netcore31#libgdiplus
public static bool IsDrawingSupported
{
get
{
#if NETCOREAPP
if (!IsWindows)
{
if (IsMobile)
{
return false;
}
else if (IsOSX)
{
return NativeLibrary.TryLoad("libgdiplus.dylib", out _);
}
else
{
return NativeLibrary.TryLoad("libgdiplus.so", out _) || NativeLibrary.TryLoad("libgdiplus.so.0", out _);
}
}
#endif

return IsNotWindowsNanoServer && IsNotWindowsServerCore;

}
}
// Drawing is not supported on non windows platforms in .NET 7.0+.
public static bool IsDrawingSupported => IsWindows && IsNotWindowsNanoServer && IsNotWindowsServerCore;

public static bool IsAsyncFileIOSupported => !IsBrowser && !(IsWindows && IsMonoRuntime); // https://github.com/dotnet/runtime/issues/34582

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ namespace System
{
internal static partial class LocalAppContextSwitches
{
private static int s_enableUnixSupport;
public static bool EnableUnixSupport
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
return GetCachedSwitchValue(@"System.Drawing.EnableUnixSupport", ref s_enableUnixSupport);
}
get => false;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;net48</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;net48</TargetFrameworks>
<IgnoreForCI Condition="'$(TargetsMobile)' == 'true'">true</IgnoreForCI>
</PropertyGroup>
<ItemGroup>
Expand Down

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

This file was deleted.