Skia: an open source 2D graphics library
skia.org
skia.org
Regret it. Google doesn't care to maintain CMake support for it, so there goes pulling it in via source and building as a library dependency. https://github.com/aseprite/aseprite/issues/1598#issuecommen...
You may ask, "why don't you just write your own CMake module like everyone else?" I've tried. I think the build system changed a bit since, but back when I last tried, it required grabbing depot tools, checking out a source tree and a ton of other dependencies.
I am the original person that got Aseprite building on FreeBSD - but now I can't build it on any platform at all. Skia has too many points of failure in the build process. (Here's another issue where I spend hours trying to figure out what's going on https://github.com/aseprite/aseprite/issues/1081)
Every other graphics library (SDL2, Allegro, SFML) can work with CMake.
Another pain point: Skia isn't on any package managers to my knowledge. Here's the debian RFP https://bugs.debian.org/818180.
Just checked, and Skia is not to be found anywhere across vcpkg, Conan, Hunter, Ubuntu, Debian.
So using C# sounds much better than having to understand Google specific build processes to compile it.
There is a ticket open for building an abstraction layer @ https://github.com/aseprite/aseprite/issues/139
In terms of Aseprite:
> > But what made it the choice over Allegro 5, SFML, and SDL2?
> through all these years I reached to the conclusion that you need full control of mouse and keyboard messages (and all window messages in particular, e.g. to give proper support to pen/stylus). [1]
[1] https://github.com/aseprite/aseprite/issues/139#issuecomment...
So far, the only library I've used that can properly abstract graphics tablets across platforms is Qt, and in the past it has been sometimes rough around the edges with support for it. I think on Windows it is still using the Wintab32 API and not the newer Windows 8 Ink APIs, for example.
The conclusion was after a whole bunch of bug fixes (OpenGL ES 2.0 IIRC), it ran but (a) ate up a lot of GPU memory (b) was slower than the 2D rendering for 80% of the drawing operations (c) some rendering ops (such as the font wide) could not be easily accelerated, meaning you would need to flush the GPU partially rendered frame periodically, then bring into the CPU cache, draw over and then flush again before writing more GPU operations.
Fun experiment - poor outcome!
But yes, the Quantum Render project is all about making WebRender Firefox’s primary graphics backend.
Currently targeting the C++ language. The guy is writing it in C++ and is targeting Windows & Linux. I think he's using openGL.
> It serves as the graphics engine for Google Chrome and Chrome OS, Android, Mozilla Firefox and Firefox OS, and many other products.
I'm interested to understand more about how some categories of software libraries don't foster multiple strong open source alternatives, while others do.
It makes more sense to adapt a standard formula to a given use case than it is to derive a custom formula from the ground up. I suspect the reason why its not the case for software is because of copyright and IP laws.
Likewise, I expect mathematics wouldn't have advanced as much as it has had there been IP laws enacted for mathematics. People would too limited by the licensing terms for their Leibniz™ and Euler™ formulas to be able to be able to build the next step.
bash-dependent meta-builder for ninja-build working in git checkouts. Are both actual releases and traditional build systems that out of fashion?
kamloops$ gn Traceback (most recent call last): File "/home/bch/work/skia/src/vendor/depot_tools/gn.py", line 38, in <module> sys.exit(main(sys.argv)) File "/home/bch/work/skia/src/vendor/depot_tools/gn.py", line 22, in main bin_path = gclient_utils.GetBuildtoolsPlatformBinaryPath() File "/home/bch/work/skia/src/vendor/depot_tools/gclient_utils.py", line 749, in GetBuildtoolsPlatformBinaryPath raise Error('Unknown platform: ' + sys.platform) gclient_utils.Error: Unknown platform: netbsd8
Skia statically links in copies of these dependencies for testing purposes only. There is a mode ("is_official_build") that will search for your system libraies.
So C++ applications on Android that wish to use Skia, do have to use the Java API via JNI (android.graphics.Canvas) with the respective performance impact due to marshaling, or package their own Skia version, thus increasing their APK size and having to deal with a build system that only makes sense for Google employees.
Everything else should be done at Java level.
I understand from the point of view of security, but what is safer, provide bindings to libraries already validated and installed on the device or forcing devs to package something else?
Also even though they implement native APIs in nice C++ with RAII and stuff, it gets exposed as unsafe C APIs, so the security story isn't 100% correct.
It is quite normal and traditional though, for C/C++ developers to work with what they call statically built binaries. They're a bit bigger (may God provide mercy, and huge amounts of free diskspace to those fools that enable debug), but the odds of them working flawless on a given device are much higher.
You lost me there. I wouldn't call JNI boilerplate a C API.
> It is quite normal and traditional though, for C/C++ developers to work with what they call statically built binaries.
Polyglot dev here, including C and C++.
The way a library is linked is orthogonal to be made available on the SDK.
And in any case, creating a 2D abstraction layer stable API on top of platforms specific version APIs, specially given that all NDK APIs are C based even if written in C++, it is not rocket science, rather a matter of wanting to do it.
Hopefully we'll drop it altogether once Pathfinder is completed.
https://www.x.org/wiki/Events/XDC2016/Program/rogovin_fast_u... https://github.com/intel/fastuidraw
But, I do nearly all my work on Linux -- which is a pity because I'd love to try out a tool like Vexlio.
For now I guess I'll continue to stick with yEd, because it actually works everywhere (java works).
Seems it is faster and has a broader API. I sort of expected that Raph Levien(1) might have contributed or that Cairo would be part of the base of Skia. But apparently not.
(1) works at Google and wrote Cairo
Skia is a great library. Pretty fast across UWP, Android, iOS and nice to have a common cross platform one that works well across most platforms (UWP, Win, Mac, iOS, Android).
UWP combined with Windows Ink (InkCanvas) is fun stuff.
We eventually abandoned Skia though because it only operates with premultiplied alpha. Works ok if you render on opaque surfaces, but we needed to generate transparent PNGs, and in the allotted timeframe couldn't resolve some rendering differences.
(Not affiliated but I love this project. If it wasn't still alpha I'd use it for absolutely everything)
I mean, say what you want about DirectWrite and the Direct2D environment - but at least it's very clear how things fit together and it works very well, even for niche use cases. In open source land, you spend days just puzzling together the pieces - let alone build them and getting them to actually do something useful from code. I've tried plenty over the last 15 years.
(edit: typos)
I use it in a little WIP game engine. It's very pleasant, excellent little library. There's an online jsfiddle-esque demo here https://fiddle.skia.org/ if you want to try it out.
Mike’s AlphaMask (sold to OpenWave) didn’t share code with the original Skia but was kind of a Skia 2, with more flexible and clearer architecture than the original. This Skia—which, again, doesn’t share code with either of its predecessors—is a kind of version 3, with a tribute name back to that original Skia.
Skia would be more useful for graphical applications focused on vector graphics (diagrams, plots, layout editors, CAD...). And for general purpose 2D graphic platforms like browsers have.
For the UI I used imgui. Skia actually comes with an imgui backend (it's used for the Viewer tool) that is easy enough to hack into whatever you need.
Even I rather use SDL, written in C, than having to deal with getting to compile Skia across my platforms.
Then there is Cocos2d-x, SFML and OpenFrameworks as well.