Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new method drawBitmapFast with better performance #458

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

jsseab
Copy link

@jsseab jsseab commented Aug 15, 2024

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: #415

@jsseab jsseab marked this pull request as draft August 15, 2024 10:00
@jsseab jsseab marked this pull request as ready for review August 15, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant