summaryrefslogtreecommitdiff
path: root/shared-module/framebufferio/FramebufferDisplay.h
diff options
context:
space:
mode:
authorJeff Epler <jepler@unpythonic.net>2021-03-14 13:27:28 -0500
committerJeff Epler <jepler@unpythonic.net>2021-03-14 13:57:46 -0500
commit9133b23a37649cc53568f8208c2493348441d700 (patch)
treed6f3fb7fb3c79d0929e1e777a344911bf009ca53 /shared-module/framebufferio/FramebufferDisplay.h
parentd2563c57dedfa3a8acaf19bfd2f5b98caad41fe9 (diff)
bitmaptools: Add readinto
When reading uncompressed bitmap data directly, readinto can work much more quickly than a Python-coded loop. On a Raspberry Pi Pico, I benchmarked a modified version of adafruit_bitmap_font's pcf reader which uses readinto instead of the existing code. My test font was a 72-point file created from Arial. This decreased the time to load all the ASCII glyphs from 4.9 seconds to just 0.44 seconds. While this attempts to support many pixel configurations (1/2/4/8/16/24/32 bpp; swapped words and pixels) only the single combination used by PCF fonts was tested.
Diffstat (limited to 'shared-module/framebufferio/FramebufferDisplay.h')
0 files changed, 0 insertions, 0 deletions