Giter VIP home page Giter VIP logo

skia.jl's Introduction

This is a very early experiment with using skia from Julia.

It's just enough to be able to run a simple benchmark, not yet useful.

skia.jl's People

Contributors

dcjones avatar

Stargazers

ebigram avatar James Schloss avatar Joe Gregorio avatar Max G avatar Ariel Keselman avatar Shashi Gowda avatar Rohit Varkey Thankachan avatar Lubomir Anastasov avatar Tim Holy avatar Jake Rosoman avatar Simon avatar

Watchers

 avatar James Cloos avatar Simon avatar Jake Rosoman avatar Tim Holy avatar Rohit Varkey Thankachan avatar  avatar

skia.jl's Issues

Make Practical

Ping @timholy. This may interest you.

This repo is a little experiment I just did to see if skia could get us better drawing performance than cairo. Skia was developed for chrome. Firefox was using cairo but switched to skia, I think for performance reasons.

I did a little benchmark (in src/bench.jl) drawing 1e6 randomly placed circles, and the times are promising:

Skia: elapsed time: 1.74048119 seconds (43 kB allocated)
Cairo: elapsed time: 6.268057011 seconds (2 kB allocated)

It wouldn't be hard to write a Compose backend for Skia and get significantly better performance on large plots. However major caveats:

  • Skia does not have a package in most repositories (e.g. homebrew, debian, etc).
  • It's intended to be statically linked to C++ programs. It took me a little tinkering to get a usable shared library.
  • The ABI is not stable, and the API is only semi-stable.
  • The C API is very incomplete and not intended as more than a toy. E.g. I had to add a draw circle function because they had only bothered with oval. Skia also has some fancy GPU backends but none of that is exposed in the C API.

So if we were to make this a practical library we would be forced to 1. maintain our own C bindings, 2. build and distribute our own binaries for the library. Maybe that's worth it, I'm not sure yet.

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.