Giter Club home page Giter Club logo

alphaskia's Introduction

alphaSkia

alphaSkia is a special cross platform Skia wrapper used in alphaTab it aims to provide a HTML5 Canvas like API to alphaTab providing a consistent rendering experience across the alphaTab flavours like web, .net and Kotlin. Differences across operating systems might still apply.

Versioning

alphaSkia a slightly adapted Semantic Versioning scheme where the PATCH part indicates the Skia milestone version we have integrated.

Currently we are on Skia m120

Given a version number MAJOR.MINOR.SKIA:

  1. MAJOR is incremented when we make incompatible API changes.
  2. MINOR is incremented when we add functionality in a backward compatible manner
  3. SKIA is aligned with the Skia milestone we have integrated. See here and here

The prerelease labels and tags we use:

  • Pre-Release versions for builds which are in-development
    • SemVer: -alpha.<build counter> (NuGet and NPM)
    • NPM Tag: alpha
    • Maven: -SNAPSHOT
  • Local Builds (not published anywhere)
    • SemVer: -local
    • Maven: -LOCAL

Supported platforms

Target .net Java Node.js
win-x64
win-x86
win-arm64
linux-x64
linux-x86
linux-arm
linux-arm64
macos-x64
macos-arm64
android-x64
android-x86
android-arm
android-arm64
ios-arm64
iossimulator-x64
iossimulator-arm64

We don't have a full automatic test matrix for all packages and platforms. If you encounter any platform problems please report them in this repository.

Credits

A big Thank you to the following projects giving me good insights on how to build Skia in a cross platform fashion. These projects influenced heavily how the pipelines of alphaSkia are organized.

alphaskia's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

alphaskia's Issues

DotNet Libraries

  • Wrapper Library
  • Native Assets Library - Linux
  • Native Assets Library - Windows
  • Native Assets Library - Android
  • Native Assets Library - iOS
  • Native Assets Library - Mac OSX

Idea: HTML5 compliant API

Having a full HTML5 canvas compatible API could be quite a big benefit for many others and alphaSkia has big potential for that.

  • API similar to OffscreenCanvas for image creation and drawing. (only 2D context, maybe some features not supported initially if they bloat the lib or are not built into Skia already)
  • FontFace for handling fonts.
  • Additional APIs:
    • like image saving (alternative to toDataURL)
    • Accept types like FontFace as setter for fonts (not only CSS string encoded font descriptions)
    • Unloading of fonts.

Setup output verification tests

We want to test for all libraries on all platforms the correct rendering output.

The test we perform is the same on all stages: We generate an alphaTab music sheet via generated test code using the alphaSkia API and visually test it against platform specific reference files. (like the visual regression tests in alphaTab).

  • Test the native shared libraries using a test executable linked against them.

    • Goal: ensure produced binaries are generally OK + ensure correct output for the platform
    • Tested variants: linux-x64-shared, macos-x64-shared, windows-x64-shared, linux-x86-shared, macos-x64-shared, windows-x86-shared
  • Test the dotnet nuget packages by consuming the nupkgs from a local source.

    • Goal: ensure native libs are correctly consumed and loaded.
    • Tested variants: linux-x64, macos-x64, windows-x64, linux-x86
  • Test the Java packages by consuming the maven packages from a local source.

    • Goal: ensure native libs are correctly consumed and loaded.
    • Tested variants: linux-x64, macos-x64, windows-x64, linux-x86
  • Test the Node packages by consuming the NPM packages via file:xxx.tgz dependencies.

    • Goal: ensure native libs are correctly consumed and loaded and we have no Node-API compat issues.
    • Tested variants: linux-x64, macos-x64, windows-x64, linux-x86
    • Tested node versions: lts/* and latest

Potential considerations:

Try reducing library size

The Shared libs are currently quite big with multiple MBs. Potentially there are still a lot of Skia symbols inside which we don't need. We should evaluate possibilities to strip those symbols.

  • Check some skia symbols we definitely do not use and find out if they are contained in the shared lib.
  • Review dllexport and visibility annotations when compiling shared/static libs as a potential cause for symbols not to be removed.
  • Check other compiler and linker flags related to DCE and symbols stripping.
  • Check source lists of LibSkia and potentially make our own with less files and modules inside.

Java Libraries

  • Wrapper Library
  • Native Assets Library - Linux
  • Native Assets Library - Windows
  • Native Assets Library - Android
  • Native Assets Library - Mac OSX

Node Libraries

  • Wrapper Library
  • Native Assets Library - Linux
  • Native Assets Library - Windows
  • Native Assets Library - Mac OSX

Multiple node versions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.