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

Faster draw functions (up to 10 times) #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

giummy
Copy link

@giummy giummy commented Jun 27, 2018

  • Precompute of indices of the buffer array to speed up drawings
  • Faster draw single pixel (fillMatrixBuffer)
  • Implementation of virtual AdaFruit GFX methods:
    --- drawFastHLine
    --- drawFastVLine
    --- fillRect
    The source has been indented and formatted using tabs, merge could not be handled by Git.

- Precompute of indices of the buffer array to speed up drawings
- Faster draw single pixel (fillMatrixBuffer)
- Implementation of virtual AdaFruit GFX methods:
--- drawFastHLine
--- drawFastVLine
--- fillRect
@2dom
Copy link
Owner

2dom commented Jun 27, 2018 via email

@giummy
Copy link
Author

giummy commented Jun 27, 2018

Oops, my 8266 is working at 40MHz with a 64x32 led matrix. Can be set at 20MHz, the optimization is at buffer matrix level, not at SPI.
The main idea is to compute the offset of the first byte of each line (actually the last one, since it is reversed to be streamed to SPI). This works correctly for 32x32 and 64x32 matrices, I didn't test for panel_width>1, but the original slower method is still there and can be used instead. At least since I would grab more than one panel... :)

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.

2 participants