Graphics library for resource constrained embedded systems
Create a 2D rasterizer, rich drawing primitives, and 2D graphics library suitable for resource constrained embedded systems (e.g. ARM Cortex-M) to be used in industrial controls, home appliances, medical devices, consumer electronics, and IoT just to name a few. The end goal would be something similar to Segger's emWin. The library would be used to drive LDCs similar to https://www.adafruit.com/product/3396 Requirements:
- Hardware agnostic; should simply render to a frame buffer
- No dependencies (No Phobos, no C standard library, and no official D runtime).
- Consider using -betterC, but a custom minimal D runtime is also a viable option
Related work:
Not sure if this makes sense to do in D (looking at the requirements). I think what is better is to use some existing lib and create a nice D binding. And use this as the "D standard graphics lib combo". D has good C interoperability, so why not use it.
One reason to not use an existing C library is so users don't need to maintain a development environment with 2 toolchains. Another reason is because D offers many things that C does not, such as CTFE, templates, mixins, and memory safety, just to name a few. All of that could be utilized to create something superior to a C implementation in D. The compile-time and metaprogramming features could help quite a bit to tune a graphics library, at compile-time, to a specific hardware constraint (e.g. pixel format) that is known statically.
More related work:
probably the library will be written from scratch so Pixman can help http://www.pixman.org/ Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization. Important users of pixman are the cairo graphics library and the X server. Its optimized for ARM/MIPS/PPC/SSE as u can see in sources.
Middle graphics libs are Cairo and Skia (just google names ~ " engine OR graphics"). Some GUI systems based on it.
probably the library will be written from scratch so Pixman can help http://www.pixman.org/
Be careful if you are looking at Pixman. It does not state what color spaces it uses. Which means its header might be a good place to get ideas, but everything else you'll need to read the papers on.
Note that https://github.com/cerjones/dg2d exist, it uses intel-intrinsics and as such some of it is already optimized for arm32/arm64. What it doesn't do is being no dependency or -betterC.