Skip to content

Commit

Permalink
Make the configuration public (#1856)
Browse files Browse the repository at this point in the history
Also move it to an internals namespace for other "configuration" points.
  • Loading branch information
mattleibow authored Aug 12, 2022
1 parent b5e04c5 commit 19e59c2
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 16 deletions.
6 changes: 6 additions & 0 deletions binding/Binding.Shared/LibraryLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
using System.IO;
using System.Runtime.InteropServices;

#if HARFBUZZ
using HarfBuzzSharp.Internals;
#else
using SkiaSharp.Internals;
#endif

#if HARFBUZZ
namespace HarfBuzzSharp
#else
Expand Down
6 changes: 3 additions & 3 deletions binding/Binding.Shared/PlatformConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#endif

#if HARFBUZZ
namespace HarfBuzzSharp
namespace HarfBuzzSharp.Internals
#else
namespace SkiaSharp
namespace SkiaSharp.Internals
#endif
{
internal static class PlatformConfiguration
public static class PlatformConfiguration
{
private const string LibCLibrary = "libc";

Expand Down
1 change: 1 addition & 0 deletions binding/Binding/GRGlInterface.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using SkiaSharp.Internals;

#if __TIZEN__
using System.Reflection;
Expand Down
1 change: 1 addition & 0 deletions binding/Binding/SKAutoCoInitialize.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Runtime.InteropServices;
using SkiaSharp.Internals;

namespace SkiaSharp
{
Expand Down
1 change: 1 addition & 0 deletions binding/Binding/SKData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using SkiaSharp.Internals;

namespace SkiaSharp
{
Expand Down
1 change: 1 addition & 0 deletions binding/Binding/SKPixelSerializer.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.ComponentModel;
using SkiaSharp.Internals;

namespace SkiaSharp
{
Expand Down
13 changes: 0 additions & 13 deletions tests/Tests/ApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,18 +260,5 @@ public void TestVersionsString()
{
Assert.Equal(SkiaSharpVersion.Native.ToString(2), SkiaSharpVersion.NativeString);
}

[Trait(CategoryKey, ApiCategory)]
[SkippableFact]
public void PlatformConfigurationIsMuslOverrideCanBeFoundViaReflection()
{
var assembly = typeof(SkiaSharpVersion).Assembly;
var config = assembly.DefinedTypes.FirstOrDefault(t => t.Name == "PlatformConfiguration");
var overrideProp = config.GetProperty("LinuxFlavor");

Assert.Equal(typeof(string), overrideProp.PropertyType);
Assert.True(overrideProp.CanRead);
Assert.True(overrideProp.CanWrite);
}
}
}
1 change: 1 addition & 0 deletions tests/Tests/BaseTest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.IO;
using SkiaSharp.Internals;

namespace SkiaSharp.Tests
{
Expand Down

0 comments on commit 19e59c2

Please sign in to comment.