5 ms·
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
by guessmyname 9y ago
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.
- raphlinus 9y agoFor 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.
- bla2 9y agoIsn'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.)
- raphlinus 9y agoIt all depends how you count. I consider the total cost of adopting a dependency the size of Skia to be quite a bit more than the lines of code written; I would have had to write _some_ code to do the interfacing. Then there's the question of source code download size and clean build times, which would have both gone up by more than an order of magnitude.
- mrlambchop 9y agoWhen leading an Android platform team several years ago, we enable the OpenGL backend to Skia to see if it would accelerate general UI rendering. 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!
- alkonaut 9y agoIf I understod correctly (which isn’t certain) Skia is also the rendering backend for chromium. Chromium is used as the rendering bits for electron. Electron is how you make these apps on “web engines”. So all those editors based on web engines likely render through Skia...
- tantalor 9y agoSkia is one part of Chromium; you also have Blink (browser engine) and V8 (js engine).
- mintplant 9y agoSkia is also used by Firefox on some platforms (I think Linux/X11 and Android?) as its graphics backend.
- shmerl 9y agoBut not with Webrender that's coming in Firefox 59 I suppose?
- chrismorgan 9y agoWebRender is not even enabled by default in Nightly yet. It’ll still be a while before it’s ready for production—definitely not Firefox 59. I don’t know of any schedule, but I haven’t been following it much either. But yes, the Quantum Render project is all about making WebRender Firefox’s primary graphics backend.
- emcrazyone 9y agoYou should have a look at 4Coder: https://4coder.handmade.network/ https://4coder.handmade.network/ Currently targeting the C++ language. The guy is writing it in C++ and is targeting Windows & Linux. I think he's using openGL.
- xstartup 9y agoEven on Linux it's best. Tooltips suck a bit compared with those Electron editors.