Live data from Hacker News

Skia: an open source 2D graphics library

skia.org

91–100 of 119 posts

Re: Skia: an open source 2D graphics library

#91

With all the fuss with "modern" text editors built on top of web engines, I feel the need to remind you all that one of the fastest graphical code editors that I have ever used — SublimeText — was built using Skia for the rendering. I believe many people have noticed how smooth the interface and most of the operations feel, a very good selling point if you want to build a GUI in the future.

For xi-editor I considered Skia but ultimately decided to write my own OpenGL renderer. I think Skia would have worked, but the dependency was heavyweight and I'm able to tweak my renderer (for example, it gets linear-sRGB color blending right, while Skia uses an approximation). I have a draft blog post on this in the queue, but juggling just a few too many things at the moment.

Isn't skia able to call OpenGL too? Do you think your own thing will be lighter weight in the end? Which parts of skia do you think you won't need? (For sRGB, a patch for skia might be less work than a full new 2d library. Also depends on if your goal is to write fun code or to get a product out, of course.)

Re: Skia: an open source 2D graphics library

#92
post #81

Earlier quoted context omitted.

This can't be intentional, right?

Google does not seem interested in making the NDK anything more than implementing Java native methods, 3D graphics, audio or porting code from other platforms. 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 imple…

Skia does not have a stable ABI, which is a requirement for inclusion in the NDK: https://github.com/google/skia/blob/master/experimental/c-ap...

Re: Skia: an open source 2D graphics library

#93
post #81

Earlier quoted context omitted.

Google does not seem interested in making the NDK anything more than implementing Java native methods, 3D graphics, audio or porting code from other platforms. 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 imple…

Skia does not have a stable ABI, which is a requirement for inclusion in the NDK: https://github.com/google/skia/blob/master/experimental/c-ap...

It has a stable API for Java clients on Android, if Google actually would care they could expose that one.

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.

Re: Skia: an open source 2D graphics library

#95
post #61
post #43

Earlier quoted context omitted.

Similar situation to the freetype/harfbuzz all-but-Microsoft/Apple (open source) monoculture. I'm interested to understand more about how some categories of software libraries don't foster multiple strong open source alternatives, while others do.

I was thinking about this recently. I think this type of consolidation starts to make sense if you think of software as mathematics. A formula gets devised, iterated upon and refined, adopted, and then finally built upon. 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 cop…

There are many degrees of freedom to work on when it comes to mathematics, many perspectives to look at the same problem. Some are elegant, some are ugly, others are painful to work with, and make future progress hard. Just as it is with software. We constantly need to reassess our foundations, and not get too coupled to a single perspective, lest it drive us into a corner and stifle further innovation.

Re: Skia: an open source 2D graphics library

#96
post #9

Also there is a Rust adapted version https://github.com/servo/skia , used on Servo

For a few things. These days most of Servo rendering is done on the GPU by WebRender. I think we only use Skia for canvas right now. Hopefully we'll drop it altogether once Pathfinder is completed.

Will it be possible for others to use webrender/Pathfinder similar to Skia or Cairo? Or is it pretty connected to servo?

Re: Skia: an open source 2D graphics library

#98
post #75

How about font rendering? Would I use freetype/harfbuzz with this? They're such a bitch to build on Windows. Currently I'm using DirectWrite but having portability would be a nice bonus, as it seems that the API of this isn't worse than Direct2D.

The Firefox and Servo team are currently hard at work on Pathfinder, which should solve this for both fonts and SVG. It'll run on the GPU like WebRender which is super exciting: https://github.com/pcwalton/pathfinder - alas it's still a WIP at the moment.

Re: Skia: an open source 2D graphics library

#99
post #42

Aseprite switched to Skia a year or so ago ( https://github.com/aseprite/aseprite ). 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…

This must be Google's "strategy" for keeping people from profiting off of their open source code. I've encountered so many of their "open source" projects that are nigh impossible to build without having a Googler sitting in a chair next to you, walking you through all the unrecorded changes to the build process since the last time the documentation was updated.

Re: Skia: an open source 2D graphics library

#100
post #98
post #75

How about font rendering? Would I use freetype/harfbuzz with this? They're such a bitch to build on Windows. Currently I'm using DirectWrite but having portability would be a nice bonus, as it seems that the API of this isn't worse than Direct2D.

The Firefox and Servo team are currently hard at work on Pathfinder, which should solve this for both fonts and SVG. It'll run on the GPU like WebRender which is super exciting: https://github.com/pcwalton/pathfinder - alas it's still a WIP at the moment.

That's very interesting, didn't know about this. It seems like it'll take substantial time for this to stabilize though. But still, something to revisit next time I'm evaluating options.
Post reply on HN