Added a new method drawBitmapFast in Adafruit_SPITFT which is esentially a copy of the Adafruit_GFX drawBitmap but with much better performance. This is achieved by setting up the address window for the whole image; not for each pixel.
Performance is about 8 times higher.
The method applies clipping so that only the portion of the image that is within the display bounds is written.
Code has been tested with various X/Y offsets to verify that clipping is properly applied.
Note that I was forced to create a copy because of the stated limitations of Adafruit_GFX. I would rather change the Adafruit_GFX method, but that would require adding some abstract methods (e.g. for setting up the window) which would break backward compatibility.
Added a new method drawBitmapFast in Adafruit_SPITFT which is esentially a copy of the Adafruit_GFX drawBitmap but with much better performance. This is achieved by setting up the address window for the whole image; not for each pixel.
Performance is about 8 times higher.
The method applies clipping so that only the portion of the image that is within the display bounds is written.
Code has been tested with various X/Y offsets to verify that clipping is properly applied.
Note that I was forced to create a copy because of the stated limitations of Adafruit_GFX. I would rather change the Adafruit_GFX method, but that would require adding some abstract methods (e.g. for setting up the window) which would break backward compatibility.
This change is related to this issue: https://github.com/adafruit/Adafruit-GFX-Library/issues/415