Sometrik / canvas

C++ canvas implementation
MIT License
37 stars 8 forks source link

Creating Paint object for every draw call causes strain on the garbage collector #15

Closed rekola closed 7 years ago

rekola commented 8 years ago

We are currently creating a Paint object every time we draw something, and all of those instances must be garbage collected. Also, it's slow to set all the parameters everytime we do anything. This is why we should have a AndroidPaint class for AndroidContext, which keeps a single copy of the Paint object.

rekola commented 7 years ago

Done.