I'm working on developing an Android drawing low latency app. Canvas is obviously too slow for this. This is for a small personal project of mine. I'm a developer but not an Android developer, so I'd like this component in a state that I can tinker with.
Here are the main features. If you can still do a good subset of these, let me know!
* Low latency rendering is the most important thing. There should be no (or little) space between the pointer on the screen and the brush stroke. I suspect there's a way of having a small "Layer" (Surface) at the tip of the pointer, while actually committing the brush to the main image in a different thread. I assume it could also be a native component or an OpenGL component. Maybe some clever buffer tricks. Up to you.
* it should support different brush types (pencil, pen, etc), with characteristics like thickness transparency etc. By support I mean something that can be added later, you don't have to implement these. Ideally if I can have access to the raw pixels I'll figure out how the brushes would work later and I can tinker with it. If you know how to simulate these brushes, all the better.
* Should run on Android 5.0+. Bonus points for ChromeOS (I understand they have some other APIs that can be used). Let me know if there's a reason the SDK version should be different.
* Should have Undo/Redo history, without killing the memory. This would work with zipping the image delta between 2 brushstrokes. Or if it works fast enough, replaying the history.
* Should have the possibility to zoom in/out and pan.
* Should be possible to instantiate multiple of these components in the same app.
* Should work with an active stylus. I assume this is trivial.
* Should support multiple layers
* Should support being resized
* Should be in Java. I'm not familiar with Kotlin. C++/Native also works.
* There should be a way to access the pixels to do simple operations (like set background, paste an image) even if it's in a slow way.
The deliverable should be an app with this component, minimal UI, minimal brushes (transparent black circle could do the trick).
Looking forward to your questions and proposals.