Adafruit-GFX-Library
Adafruit-GFX-Library copied to clipboard
Add new method drawBitmapFast with better performance
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
Hello, I am very new to GitHub and don't know how pull requests work. If I am using Adafruit-GFX-Library version 1.12.1, will your improvement be included? It looks like the merge has not happened, but again, I don't know what I'm looking at.
Hello, I am very new to GitHub and don't know how pull requests work. If I am using Adafruit-GFX-Library version 1.12.1, will your improvement be included? It looks like the merge has not happened, but again, I don't know what I'm looking at.
It seems like this PR has not been accepted. Not sure exactly why. Either way, you have several options if you want my changes. You could use your existing Adafruit library code and manually apply the changes from my branch - there's only one added function and 2 files changed. That might be the easiest way if you're not used to Git.
Or you could fetch the Adafruit repo and do a local merge of my branch.
Third option is to simply use my branch instead of the Adafruit repo.