Skip to content

Integrate alphaSkia #1292

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

Merged
merged 16 commits into from
Dec 3, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Register Skia canvas centrally
  • Loading branch information
Danielku15 committed Dec 3, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit ac038a870a24c9c18fa8226fe07d2d89734f3a3b
5 changes: 0 additions & 5 deletions src.csharp/AlphaTab/Environment.cs
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@
using AlphaTab.Core;
using AlphaTab.Collections;
using AlphaTab.Platform.CSharp;
using AlphaTab.Platform.Skia;

namespace AlphaTab
{
@@ -36,10 +35,6 @@ public static Action Throttle(Action action, double delay)

private static void CreatePlatformSpecificRenderEngines(IMap<string, RenderEngineFactory> renderEngines)
{
renderEngines.Set(
"skia",
new RenderEngineFactory(true, () => new SkiaCanvas())
);
renderEngines.Set(
"gdi",
new RenderEngineFactory(true, () => new GdiCanvas())
14 changes: 8 additions & 6 deletions src/Environment.ts
Original file line number Diff line number Diff line change
@@ -365,6 +365,14 @@ export class Environment {
})
);
renderEngines.set('default', renderEngines.get('svg')!);

renderEngines.set(
'skia',
new RenderEngineFactory(false, () => {
return new SkiaCanvas();
})
);

Environment.createPlatformSpecificRenderEngines(renderEngines);
return renderEngines;
}
@@ -406,12 +414,6 @@ export class Environment {
return new Html5Canvas();
})
);
renderEngines.set(
'skia',
new RenderEngineFactory(false, () => {
return new SkiaCanvas();
})
);
}

private static createDefaultStaveProfiles(): Map<StaveProfile, BarRendererFactory[]> {