- All color calculation is done by the base class PGraphics.
- Which means it’s renderer independent!
- Simply invoking color() doesn’t mutate the PGraphics’s canvas in any way.
- Otherwise it woulda crashed the whole sketch if it was done by another Thread!
- The reason multi-threaded color() messes up everything is b/c temporary calculations are stored in instance fields of the the PGraphics.
- That’s just very bad programming!
- Correct way would be to forward temporary calculation as method parameters.